Skip to content

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