After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 560692 - Struct/union inheritence
Struct/union inheritence
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 559704 720090 729384
 
 
Reported: 2008-11-13 20:47 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2018-02-08 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan (not receiving bugmail) Dahlin 2008-11-13 20:47:39 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
Comment 1 André Klapper 2015-02-07 17:18:26 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 2 GNOME Infrastructure Team 2018-02-08 11:46:38 UTC
-- 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.