8000 Fixing type reference to self by wflohry · Pull Request #64 · robotpy/robotpy-cppheaderparser · GitHub
[go: up one dir, main page]

Skip to content

Fixing type reference to self #64

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.

< 8000 a href="/signup?return_to=%2Frobotpy%2Frobotpy-cppheaderparser%2Fissues%2Fnew%2Fchoose" data-view-component="true" class="btn-primary btn mx-auto"> Sign up for GitHub

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

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Fixing type reference to self #64

merged 2 commits into from
Feb 12, 2021

Conversation

wflohry
Copy link
Contributor
@wflohry wflohry commented Feb 12, 2021

There seems to be a bug for some functions that reference the type itself. For instance, running the parser against the struct A shown below will result in a "Circular reference detected" during the JSON encoding step:

struct A{
        bool operator==(const A& other) const {
                return true;
        }
};

This PR solves this issue by removing any circular references in the dictionary before passing to the JSON.

@virtuald
Copy link
Member

Thanks for the fix!

FWIW, I wrote a different C++ parser in python (https://github.com/robotpy/cxxheaderparser), and I'd encourage you to try it out. Once I finish migrating my tools over to it I'm going to deprecate this repo. Would love any feedback!

@virtuald virtuald merged commit c9813ef into robotpy:main Feb 12, 2021
@wflohry
Copy link
Contributor Author
wflohry commented Feb 12, 2021

Thanks! Will check it out.

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
0