mvz / gir_ffi

Auto-generate bindings for GObject based libraries at run time using FFI

Home Page:https://github.com/mvz/gir_ffi/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline pointer conversion logic

mvz opened this issue · comments

The use of all-knowing pointer classes in the generated methods makes it very hard to see what's going on at the memory level. This in turn makes it harder to more carefully handle things like ownership transfer and type-dependent freeing strategies.

Therefore, the logic that is now in InOutPointer and InPointer should be moved. The first step is to move all the type-dependent conditionals to the Builders, so specialized methods are called directly in the generated methods. Next, the specialized methods can be moved elsewhere if needed.