go-clang / gen

Generate Go bindings for Clang's C API
https://pkg.go.dev/github.com/go-clang/gen
BSD 3-Clause "New" or "Revised" License
44 stars 5 forks source link

HeaderFile.handle overwrites previously written code #136

Closed zimmski closed 7 years ago

zimmski commented 7 years ago

There are cases where additional header files add additional methods to structs which in turn overwrite the previously written version of the struct because the object/lookup tables are not shared among the HeaderFile objects.

We need to move the generation and writing code of HeaderFile.handle into a separate phase, maybe in its own struct and method. Thoughts?

markusriedl commented 7 years ago

is this because of #134?

markusriedl commented 7 years ago

could you point me to the exact location where this happens?

zimmski commented 7 years ago

Yes, #134 is the reason. It works by reverting that PR.

zimmski commented 7 years ago

https://github.com/go-clang/gen/blob/master/api.go#L47 I think

markusriedl commented 7 years ago

pfu, well, ah, we need a clear separation from headerfile and generation. how exactly, dunno yet