-
Notifications
You must be signed in to change notification settings - Fork 745
typedef struct X * X generates invalid Rust code #1252
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
Comments
Or, probably, it should rename original structure.. I'm not really sure what's the right thing to do here. |
Yeah, I think renaming it is the right thing, though it's slightly annoying... We may want to support a "C" naming mode, where structs become |
For now the best solution would be to blacklist it, preventing it from getting generated, but that's annoying. |
@emilio is there some workaround I can use meanwhile? I really need that poptOption (the real version of X mentioned here) because bindings I generate have it as argument to some functions. |
@ignatenkobrain FWIW I too just had to deal with bindgen and My "solution" was to have bindgen produce a C++ binding instead of a C one, which triggers some |
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
I'm not sure what exact output is correct, but I think
struct X { ... } X;
is equivalent tostruct X { ... }; typedef struct X * X;
, so probably right thing to do is:The text was updated successfully, but these errors were encountered: