We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 generates types in the order they appear in a header file.
Consider following example:
typedef struct points points; typedef struct point point; struct points { point *point1; point *point2; }; struct point { int x; int y; };
It will generate types in the following order:
type struct_points = native.CStruct2[native.Ptr[point], native.Ptr[point]] type points = struct_points type struct_point = native.CStruct2[native.CInt, native.CInt] type point = struct_point
In generated code points appear before point although points uses point.
points
point
To sort types we need to know what types are used by other types and then do topological sort.
There is also one problem that should be considered, types may have cyclic dependency:
struct b; struct c; struct a { struct b *b; }; struct b { struct c *c; }; struct c { struct a *a; };
The text was updated successfully, but these errors were encountered:
I think this should be moved to 0.4
Sorry, something went wrong.
No branches or pull requests
Bindgen generates types in the order they appear in a header file.
Consider following example:
It will generate types in the following order:
In generated code
points
appear beforepoint
althoughpoints
usespoint
.To sort types we need to know what types are used by other types and then do topological sort.
There is also one problem that should be considered, types may have cyclic dependency:
The text was updated successfully, but these errors were encountered: