-
Notifications
You must be signed in to change notification settings - Fork 68
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
Wrong order of generated structs for generation of structs containing anonymous unions #325
Comments
This can be fixed by storing the indices of those nested records in the |
Printing the nested records right after the prologue does not solve the problem though if the nested records themselves or their generated getproperty/setproperty! functions depend on other structs that are defined after the prologue. The best guess for a suitable position is probably right before the struct that contains the anonymous union. |
You're right. A better way is to add the indices of those inner nested structs to the nested struct. In this way, the order will be sorted automatically in the toposort pass. |
* all `gensym` calls are recorded. * Fix JuliaInterop#325.
* all `gensym` calls are recorded. * Fix JuliaInterop#325.
Hi everyone,
thank you for the amazing package so far!
I think I encountered a small (but annoying) bug in the current master branch: the generation of structs containing anonymous unions prints the corresponding Julia union wrapper struct after the original struct definition.
In my case, the C struct
results in the generated code
leading to
If I am not missing something, the problem can be solved by changing the order of the generated structs.
The text was updated successfully, but these errors were encountered: