Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Record and Enumeral Types #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

plpetkov
Copy link

Hi, I have been working on developing a plugin for automatic testcase generation and I am using gcc-python-plugin. Here's a few changes I made to support record and enumeral types.

I have a few more changes but will add them in a separate request.

Thanks.

@tromey
Copy link
Contributor

tromey commented Nov 19, 2015

IMO this would need documentation changes and tests in order to go in (though it's not up to me...)

Anyway I wanted to note that this addresses an issue I had here: https://fedorahosted.org/gcc-python-plugin/ticket/67

@tromey
Copy link
Contributor

tromey commented Nov 20, 2015

FWIW the enum patch doesn't work for me.

I had to make two changes: first, change the generate-c-tree.py patch to use PyGcc_TreeMakeListOfPairsFromTreeListChain; and second, fix gcc-python-tree.c to use that name rather than gcc_tree_list_of_pairs_from_tree_list_chain

With those two changes, it worked as I expected -- ".values" became a Python list of (name,value) pairs.

@tromey
Copy link
Contributor

tromey commented Nov 20, 2015

I pushed my version of the enumeral type patch here: https://github.com/tromey/gcc-python-plugin/tree/add-values-to-EnumeralType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants