On Wed, 30 Jun 2010, Nicolas Palix wrote: > 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.
Oops. Indeed, the argument of D should be whatever is the name of the virtual identifier. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
