>> @adjustment@
>> expression ex;
>> statement S;
>> @@
>> -LIST_FOR_EACH_ENTRY
>> +hlist_for_each_entry
>> (..., ...,
>> -ex,
>> ...)
>> S
>
> This is not completely a good idea.
I tried to show another approach.
> The ... in the argument list will match a sequence of things, not a single
On Sat, 2 Dec 2017, SF Markus Elfring wrote:
> >> @adjustment@
> >> expression ex;
> >> statement S;
> >> @@
> >> -LIST_FOR_EACH_ENTRY
> >> +hlist_for_each_entry
> >> (..., ...,
> >> -ex,
> >> ...)
> >> S
> >
> > This is not completely a good idea.
>
> I tried to show another approach.
>
>
>
> @adjustment@
> expression ex;
> statement S;
> @@
> -LIST_FOR_EACH_ENTRY
> +hlist_for_each_entry
> (..., ...,
> -ex,
> ...)
> S
This is not completely a good idea. The ... in the argument list will
match a sequence of things, not a single thing. It could be:
-LIST_FOR_EACH_ENTRY
>> I think I've found a bug in spatch,
You showed another opportunity for further development considerations.
>> or maybe I'm just using it wrong.
Not really.
But the specification in the shown small SmPL script could be adjusted.
>> - LIST_FOR_EACH_ENTRY(c,f,g,member) S
>> +