Re: [pygccxml-development] declarations string, stability
Brought to you by:
mbaas,
roman_yakovenko
From: Gustavo C. <gjc...@gm...> - 2007-12-08 18:57:30
|
On 08/12/2007, Roman Yakovenko <rom...@gm...> wrote: > > On Dec 8, 2007 3:02 PM, Gustavo Carneiro <gjc...@gm...> wrote: > > Hi Roman and all, > > > > Suppose I wanted to: > > > > 1- Scan header files once; > > 2- Store the definitions found in my own XML format, including for > each > > definition a string that uniquely identifies it; > > 3- Later, I run the same program that scans a new set of > definitions > > 4- At this point the program should be able to detect: a) newly > added > > definitions, b) changed definitions (only changed parameter names), c) > > removed definitions; > > > > For step 4 I need to get a definitions identifier that is stable across > > current and future (py)gccxml versions. Is decl_string the identifier I > > want? > > No, what you want is to use declarations.full_name function. Are you sure? It does not seem to include the full signature. Example, for the methods: int get_int (const char *from_string); int get_int (double from_float); full_name prints: '::SomeObject::get_int' '::SomeObject::get_int' P.S. Be careful with unnamed declarations. I am not sure when I get unnamed declarations. But in any case, one step at a time... :) -- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert |