Description
I'm trying to create a dart wrapper to the Python C API, so that I can call python code from dart easily / pass objects back and forth.
I was using a different library to generate the ffi bindings, but am now trying to switch to this library. One issue that I have is that there are some global objects that are present in the dynamic / shared library / header files, but not in the generated bindings.
See for example the _Py_TrueStruct, and _Py_FalseStruct here
My current workaround and generated bindings are here. Essentially just adding another file and extensions on the generated class and reexporting everything. I'm not sure how many definitions I might be missing by just manually adding globals though.
As a side note there are a few macros that would be useful if they could be generated into functions. I know they couldn't be strongly typed, but since dart has a dynamic, it seems plausible, though probably fairly difficult since C macros are essentially copy / paste style macros, and might not necessarily be valid function definitions.