cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Can the current function name be passed to a Python snippet?
@ 2018-11-15 20:58 Timur Tabi
  2018-11-15 21:29 ` Julia Lawall
  0 siblings, 1 reply; 17+ messages in thread
From: Timur Tabi @ 2018-11-15 20:58 UTC (permalink / raw)
  To: cocci

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
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

end of thread, other threads:[~2018-12-06  6:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 20:58 [Cocci] Can the current function name be passed to a Python snippet? Timur Tabi
2018-11-15 21:29 ` Julia Lawall
2018-12-04 20:17   ` Timur Tabi
2018-12-04 20:25     ` Julia Lawall
2018-12-04 22:02       ` Timur Tabi
2018-12-04 22:19         ` Timur Tabi
2018-12-05  6:35           ` Julia Lawall
2018-12-05 17:49             ` Timur Tabi
2018-12-05 19:33               ` Julia Lawall
2018-12-05  6:34         ` Julia Lawall
2018-12-05 17:57           ` Timur Tabi
2018-12-05 18:32             ` Timur Tabi
2018-12-05 19:45               ` Julia Lawall
2018-12-05 19:11             ` Timur Tabi
2018-12-05 23:27               ` Timur Tabi
2018-12-06  6:33                 ` Julia Lawall
2018-12-05 19:32             ` 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).