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

bindgen: no declaration of opaque structs on typedef #66

Closed
Blei opened this issue Dec 17, 2011 · 3 comments
Closed

bindgen: no declaration of opaque structs on typedef #66

Blei opened this issue Dec 17, 2011 · 3 comments
Labels

Comments

@Blei
Copy link
Contributor

Blei commented Dec 17, 2011

The following struct is defined/typedefd in glib/gthread.h:

typedef struct _GMutex          GMutex;

That's all there is; it's supposed to be opaque.

Bindgen on the other hand generates the following failing code:

alias GMutex = Struct__GMutex;

I thinks something like alias Struct__GMutex = Opaque; or alias GMutex = Opaque; should be generated.

@jckarter
Copy link
Owner

@Blei I tried generating the following file with bindgen as-is:

typedef struct _GMutex          GMutex;

and I got:


/* automatically generated by clay-bindgen */

alias Struct__GMutex = Opaque;

alias GMutex = Struct__GMutex;

Is struct _GMutex defined in another header that doesn't match your -match filters?

@jckarter
Copy link
Owner

@Blei Just in case, I pushed a patch that ensures that opaque types get visited for typedefs (as well as a patch to fix your other bug, which I did reproduce). Let me know if it helps.

@Blei
Copy link
Contributor Author

Blei commented Dec 19, 2011

Works perfectly. Thanks!

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

No branches or pull requests

2 participants