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 743596 - G_DECLARE_DERIVABLE_TYPE() should allow additional typedef for circular referencing cases.
G_DECLARE_DERIVABLE_TYPE() should allow additional typedef for circular refer...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-01-27 18:53 UTC by Christian Hergert
Modified: 2015-01-28 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtype: allow forward declarations for circular types (1.62 KB, patch)
2015-01-27 18:53 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2015-01-27 18:53:14 UTC
This is common when you have a lot of interrelated objects that requires
putting the typedefs in a foo-types.h.
Comment 1 Christian Hergert 2015-01-27 18:53:17 UTC
Created attachment 295579 [details] [review]
gtype: allow forward declarations for circular types

This allows multiple declarations such as:

 typedef struct _Foo Foo;

as is needed when you have systems with circular referencing.
Comment 2 Allison Karlitskaya (desrt) 2015-01-28 13:25:04 UTC
Pushed with a slightly tweaked commit message summary line.

Thanks!

fwiw, I was going to do the same for the Class struct definition in the
_FINAL_ variant of this macro until I realised that it would make no
sense at all.  That struct is defined only for convenience and it really
ought not to be declared anywhere else at all if the class is final.