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 600161 - Do not use static GTypeInfo and GInterfaceInfo
Do not use static GTypeInfo and GInterfaceInfo
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
2.23.x
Other All
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-10-30 19:24 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-11-30 03:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not use static GTypeInfo and GInterfaceInfo (13.67 KB, patch)
2009-10-30 19:25 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Do not use static GTypeInfo and GInterfaceInfo (13.11 KB, patch)
2011-11-30 03:03 UTC, Matthias Clasen
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2009-10-30 19:24:37 UTC
Initially reported here:
http://mail.gnome.org/archives/gtk-devel-list/2009-October/msg00168.html

Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables.

Patch following
Comment 1 Javier Jardón (IRC: jjardon) 2009-10-30 19:25:14 UTC
Created attachment 146587 [details] [review]
Do not use static GTypeInfo and GInterfaceInfo
Comment 2 Javier Jardón (IRC: jjardon) 2009-12-09 22:15:25 UTC
FYI, the GTK+ bug was accepted: bug #600158
Comment 3 Matthias Clasen 2011-11-30 03:03:38 UTC
The following fix has been pushed:
f24d824 Do not use static GTypeInfo and GInterfaceInfo
Comment 4 Matthias Clasen 2011-11-30 03:03:41 UTC
Created attachment 202415 [details] [review]
Do not use static GTypeInfo and GInterfaceInfo

Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.