Is it possible for a Python code snippet to be passed the name of the
current function?  I already have Python code in my .cocci file that
cleans up the text of some string literals.  I want to add more code
that removes the current function name from the beginning of a string
literal.  So for instance, If I have

void myfunc(void)
{
...
    NV_PRINTF("myfunc: xxx\n");

I want to replace the NV_PRINTF line with:

    NV_PRINTF("xxx\n");

To do that, the Python code would need to given "myfunc" as a
parameter of some kind.
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to