On Sat, 2012-08-18 at 00:24 +0100, Philip Herron wrote:
Hey
Just wondering whats the best way to post a patch, for C++.
Please post this as a patch, generated with "git diff". Ideally you
should also create a test case and documentation.
There are some notes on this here:
http://gcc-python-plugin.readthedocs.org/en/latest/getting-involved.html#...
You see
classes as TYPEDECLS, and in essence it just looks like a struct, but
if you check TYPE_METHODS you get to see associated methods which
would make it a class. So i just added to:
generate-tree-c.py: L458
if tree_type.SYM in ('RECORD_TYPE', 'UNION_TYPE',
'QUAL_UNION_TYPE'):
add_simple_getter('fields',
'gcc_tree_list_from_chain(TYPE_FIELDS(self->t))',
"The fields of this type")
add_simple_getter('methods',
'gcc_tree_list_from_chain(TYPE_METHODS(self->t))',
"The TYPE_METHODS")
--Phil
_______________________________________________
gcc-python-plugin mailing list
gcc-python-plugin(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/gcc-python-plugin