diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-04-04 09:31:11 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2013-04-04 11:10:17 -0400 |
commit | c5307e4cba67fadf1749c9a5c127bf1000c1dc89 (patch) | |
tree | e0582d12c5959ca141f2eb77d50eb385b674454b | |
parent | 859e4239c575a0e597f32d017d6012be7b4d3ab8 (diff) | |
download | glib-c5307e4cba67fadf1749c9a5c127bf1000c1dc89.tar.gz |
gtype: interface-after-init exception for glibmm
glibmm has a pretty difficult-to-solve problem caused by our recent
change to deny addition of interfaces to classes after initialisation.
They're looking for a long-term workaround for the problem, but in the
meantime we can allow the registration to succeed (with warning) if the
class looks like it's being defined by gtkmm.
https://bugzilla.gnome.org/show_bug.cgi?id=697229
-rw-r--r-- | gobject/gtype.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gobject/gtype.c b/gobject/gtype.c index a82144251..1fd31e87d 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1006,7 +1006,10 @@ check_add_interface_L (GType instance_type, { g_warning ("attempting to add an interface (%s) to class (%s) after class_init", NODE_NAME (iface), NODE_NAME (node)); - return FALSE; + + /* See https://bugzilla.gnome.org/show_bug.cgi?id=697229 */ + if (!g_str_has_prefix (NODE_NAME (node), "gtkmm__CustomObject_")) + return FALSE; } tnode = lookup_type_node_I (NODE_PARENT_TYPE (iface)); if (NODE_PARENT_TYPE (tnode) && !type_lookup_iface_entry_L (node, tnode)) |