On Saturday 16 January 2010 02:12:39 Michael Stefaniuc wrote:
> On 01/15/2010 07:27 AM, Julia Lawall wrote:
> 
> > in this case where the<... ...>  takes up the entire body of the function.
> In this case it was the "natural solution" to grab the function name. I 
> tried first to use p[0].function in the hope it might be there too like 
> .line and .file but it wasn't. I had seen the function name saved into p 
> when running with -debug but not knowing python I didn't know yet about 
> the wonders of dir() and type() ;).
> 

I know it is not obvious but you can get the function name with 
p[0].current_element

You can get more information about position in the wiki
http://cocci.ekstranet.diku.dk/wiki/doku.php?id=source_location_information

-- 
Nicolas Palix
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to