From mboxrd@z Thu Jan 1 00:00:00 1970 From: wagi@monom.org (Daniel Wagner) Date: Wed, 17 Jul 2013 16:58:22 +0200 Subject: [Cocci] gboolean -> bool conversion In-Reply-To: References: <51DE6A05.9050008@monom.org> <51DE75BF.3060207@monom.org> <51DE81CC.3010805@monom.org> <51DE944F.1000903@monom.org> <51DEA75C.10309@monom.org> <51DFA84A.4050805@monom.org> <51E556E8.2040701@monom.org> <51E65A19.6010903@monom.org> Message-ID: <51E6B10E.20103@monom.org> To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr On 07/17/2013 11:01 AM, Julia Lawall wrote: >> I am still struggling with creating a rule for a prototype. Rereading examples >> and documentation. >> >> So I am only allowed to write a prototype (funproto, right?) in the >> declaration section (common_decl)? How do I write the rule? >> >> (I am really bad not getting this done by myself.) > > Could you send your attempt? It should be possible to write a function > prototype pattern just like any other pattern, but it is true that I > haven't done that very much, so it might be deficient in some way. So my approach was to try this here: @r@ identifier f; parameter list[n] ps; identifier i; @@ f(ps, gboolean i, ...); And after going over the documentation I think I see my error though I have not figured yet how to do it right. cheers, daniel