cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Changing function pointer typedef
@ 2019-03-08 18:19 Jerome Glisse
  2019-03-08 18:57 ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Jerome Glisse @ 2019-03-08 18:19 UTC (permalink / raw)
  To: cocci

Coccinelle seems to have issue with function pointer. For instance
if i want to add a new argument to a function pointer typdef i need
to replace the whole typedef as one line. For instance:

test.c:
typedef int (*filler_t)(void *, struct page *);

test.spatch:
@@
type T1, T2;
@@
-typedef int (*filler_t)(T1, T2);
+typedef int (*filler_t)(T1, struct address_space *, T2);

Anything else will not work and also if the function pointer typedef
spread accross multiple line then the above does not work, in fact
i have not found a work around for that case.

I am missing some syntax that make this work with coccinelle ?

Cheers,
Jérôme
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-17 18:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 18:19 [Cocci] Changing function pointer typedef Jerome Glisse
2019-03-08 18:57 ` Julia Lawall
2019-03-08 19:11   ` Jerome Glisse
2019-03-08 19:23     ` Julia Lawall
2019-03-08 19:32       ` Jerome Glisse
2019-03-17 18:43         ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).