GNOME Bugzilla – Bug 560692
Struct/union inheritence
Last modified: 2018-02-08 11:46:38 UTC
There are a couple of structs and unions which uses inheritance in our stack that is currently quite problematic to introspection. Non-complete list: - GdkEvent (gdk) - GMenuTreeItem (gmenu) - GIBaseInfo (gobject-introspection itself) - cairo_surface (cairo) What they have in common is the following pattern: typedef enum { BANANA_STRUCT = 1; APPLE_STRUCT = 2; } StructKind; StructKind base_struct_get_kind (BaseStruct *base); BananaStruct { BaseStruct base; ... }; AppleStruct { BaseStruct base; ... }; To support this we'd need the following: 1) An annotation for each sub struct adding a relationg to the base struct, eg: BananaStruct: (child-of BaseStruct 1) AppleStruct: (child-of BaseStruct 2) The name of the struct and the type/kind value representation for that struct 2) The type getter, eg: BaseStruct: (child-getter base_struct_get_kind) We'd need to extend the GIR and the typelib to support that as well. Task list: - implement/decide annotations - update gir - update typelib - add tests - document annotation
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/8.