Re: cocci: multiple versions of function with different arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2014-04-23 at 14:14 +0200, Julia Lawall wrote:

> I can think  about it, but it is pretty far from the vision of Coccinelle,
> which is that the combination of context code and + code should be a valid
> syntactic unit, and on the side that we don't think much about ifdefs.
> 
> But I will think about it, because I can see that it is not a solvable
> problem with the current technology.

Luis kinda solved it by introducing an intermediate function that would
call the original, and then #ifdef'ing the assignment of the function
instead.

(This is only a problem when there's a function assignment to start
with, otherwise there's likely no need to modify the function
declaration - this only comes up with function pointer APIs)

johannes


--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux