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

Replace unresolved opaque types with Byte if they are used only in pointers #106

Closed
kornilova203 opened this issue Jul 6, 2018 · 4 comments
Assignees
Labels
bindgen Binding generator
Milestone

Comments

@kornilova203
Copy link
Member

kornilova203 commented Jul 6, 2018

Bindings for uv.h give following errors:

Error: type declaration for struct___fsid_t was not found.
Error: type declaration for struct___va_list_tag was not found.
Error: type declaration for struct__IO_FILE_plus was not found.
...

It happens when declaration of opaque type was not found.

Seems like it is not a problem but such cases should be handled carefully.

I checked couple of these types and they are used in one of following situations:

  • Only pointers to such type is used.
    In this case type may be replaced by Byte.
  • Type is used in a chain of unused typedefs.
    Whole chain may be removed in this case. Related to Only output types and methods from the original header #13.
  • Extern variable of such type exist.
    In uv.h these variables are private, so they should be filtered.
    We do not know size of type so we cannot change type of extern to array of Byte
    I think, it is okay to always remove these extern variables.
@kornilova203 kornilova203 added bindings Bindings for a library bindgen Binding generator and removed bindings Bindings for a library labels Jul 6, 2018
@kornilova203 kornilova203 self-assigned this Jul 6, 2018
@jonas
Copy link
Member

jonas commented Jul 6, 2018

Do you plan to address this issue in the 0.2 milestone?

@kornilova203
Copy link
Member Author

Yes, I think so

@kornilova203 kornilova203 added this to the 0.2 milestone Jul 7, 2018
@kornilova203
Copy link
Member Author

Error message is wrong, definition was not found, not declaration

@kornilova203
Copy link
Member Author

The issue is fixed

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

No branches or pull requests

2 participants