Just a random suggestion...
Right now to convert an IntegerCst to an int I have to use 'obj.constant'. It seems natural to let int(obj) work as well; that is the first thing I tried (without thinking much about it...)
Tom
On Fri, 2011-06-24 at 14:35 -0600, Tom Tromey wrote:
Just a random suggestion...
Right now to convert an IntegerCst to an int I have to use 'obj.constant'. It seems natural to let int(obj) work as well; that is the first thing I tried (without thinking much about it...)
I went ahead and implemented this as: http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=06a8...
So far all I implemented was int() on gcc.IntegerCst, but it should be possible to add the various other type-coercions if people want them.
gcc-python-plugin@lists.stg.fedorahosted.org