GNOME Bugzilla – Bug 560281
Object/classes/interface field offsets
Last modified: 2015-02-07 16:55:11 UTC
We need to compute offsets and write them for: Object member fields Object class virtual functions Interface virtual functions There's some mess to clean up here - the compiler expects interfaces to have <vfunc/> children, and it expects <vfunc/> members of the <object/> elements to apply to the class structure. But the scanner always generates <callback/> not <vfunc/> and the class structure is treated separately. (Note that without knowning all class members, including non-function members you can't compute the vfunc offsets - see GtkWidgetClass for example - so the gir probably needs to keep the full class structure definition, but it could be handled differently in the typelib if we are willing to let the two diverge.)
This may help to whoever decides to tackle it: (08:55:03 PM) owen_: there's nothing remotely technically hard about this in g-i .. I did all the stuff that was (remotely) technically hard when we added struct field offsets (08:56:00 PM) owen_: There may still be a remaining mess to sort out with where virtual functions are defined and the relationship between class structures and instance structures. Not sure if walters got that sorted or not. (08:56:31 PM) owen_: Then the rest is simply going through and hooking up the existing struct-field-offset code to virtual functions as well.
Created attachment 145947 [details] [review] Add g_ir_ffi_convert_arguments
Created attachment 145948 [details] [review] Add methods to Everything.TestInterface
Created attachment 145949 [details] [review] Remove offset from vfuncs and add it to callbacks
This work depends on Didier's patches from https://bugzilla.gnome.org/show_bug.cgi?id=557383 landing first.
Callbacks are being written as part of regular fields, maybe this one can be closed as being obsoleted by https://bugzilla.gnome.org/show_bug.cgi?id=557383 ?
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]