Closed paralaxsd closed 7 months ago
Yeah, that definitely sounds like a bug in the preprocessor conditional parsing. Thanks for the report - I'm afraid I'm a little snowed under right now but I'll take a look in a couple of days and see if I can figure out what's going wrong!
No worries, I'm glad if this helps the project a bit which already has helped me tremendously.
For the time being, my v1.90 upgrade efforts are resting comfortably in their own branch until ready for prime time :)
OK, I had a look and it was a silly mistake where the field emitting code didn't correctly recurse into the 'else' clause of preprocessor conditionals when writing the metadata. Hopefully 79e88f824161a39d56255cdc5dc3bad06871b46d should fix this - let me know if you spot any other issues with this! Thanks again for the help!
Hi Ben, thanks for the fix!
I now can generate working C# bindings for Dear ImGui v1.90 and my bindings also no longer depend on obsoleted functionality so I'm quite happy with the progress on that front.
Hi,
I've found today that for newest versions of Dear Bindings [711dc5f] and Dear ImGui docking branch [ce0d0ac], both projects freshly cloned into sibling directories, generating default json output via
python dear_bindings.py -o cimgui ..\imgui\imgui.h
would create data where certain field members that are part of a conditional group are missing.
Example: the
ImGuiIO
struct contains the following fields:I'd expect an entry for
_UnusedPadding
in the json output but onlyImeWindowHandle
is included, followed directly byCtxt
.I couldn't unfortunately bisect the issue as earlier commits are having a hard time with current Dear ImGui code but perhaps referring to the similar issue #28 that's been fixed previously can be of help!
Edit:
I had another look, running against Dear ImGui v1.89.9 which retains the conditional grouping from above and it seems to me now that
_UnusedPadding
was actually missing from the output since after 759c901. Even the fix from #28 does not reintroduce it if I run dear bindings from back then today. When I confirmed the fix it seems I didn't notice since I did not disable obsolete functions and so theImGuiIO
struct regained its correct size via theImeWindowHandle
field.