On Fri, 8 Mar 2019, Jerome Glisse wrote:

> 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 ?

Thanks for the report.  Is the error you got something like:

error in collection of - tokens: line 4 less than line 6

I will have to look into it.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to