On Wednesday 30 June 2010 15:16:41 Julia Lawall wrote:
> On Wed, 30 Jun 2010, Lucas De Marchi wrote:
> 
> > On Wed, Jun 30, 2010 at 9:49 AM, Julia Lawall <[email protected]> wrote:
> > > -all_includes and -I are for the .c file, but your problem is for the
> > > semantic patch.  In a semantic patch, you can declare new type names using
> > > typedef, among the metavariables.  So you should put:
> > >
> > > @r2@
> > > identifier r1.fn;
> > > identifier data;
> > > typedef Eina_bool;
> > > @@
> > 
> > Thanks, now it works like a charm. Also, it's not only the
> > ecore_timer_add() function that changed, but a lot of them. Is there a
> > way to pass as an argument the name of the function to look for?
> 
> You can declare a metavariable:
> 
> identifier virtual.id;

> 
> and then when you call spatch say -D fn=function_name

Did you mean "-D id=function_name" ?

fn is already used for the argument.

> 
> julia

-- 
Nicolas Palix
Tel: (+33) 1 44 27 87 25
Tel: (+33) 6 81 07 91 72
Web: http://www.diku.dk/~npalix/
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to