diff options
author | Neil Roberts <neil@linux.intel.com> | 2014-03-21 17:16:34 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2014-03-21 17:16:34 +0000 |
commit | 2e6156ef5ee5d5855b0ac17bb254bd8a55ba2c5c (patch) | |
tree | 430d9e4bfe315bc949bea58dd937082da14ab74a | |
parent | a972024ed742bbcf9ab06dbce68a39ad4558c44e (diff) |
Don't use the internal _G_DEFINE_TYPE_EXTENDED_CLASS_INIT macro
This macro is internal to gobject so using it risks breaking Cogl if
glib changes its API. Instead we just use its expansion. Note that
glib provides two expansions for this depending on the glib version
but this only uses the one for older versions.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
-rw-r--r-- | cogl/cogl-gtype-private.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cogl/cogl-gtype-private.h b/cogl/cogl-gtype-private.h index 21590da6..03832eff 100644 --- a/cogl/cogl-gtype-private.h +++ b/cogl/cogl-gtype-private.h @@ -191,7 +191,12 @@ cogl_##name##_get_gtype (void) \ static gpointer name##_parent_class = NULL; \ static gint Name##_private_offset; \ \ - _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(Name, name) \ + static void \ + name##_class_intern_init (gpointer klass) \ + { \ + name##_parent_class = g_type_class_peek_parent (klass); \ + name##_class_init ((Name##Class*) klass); \ + } \ \ static inline gpointer \ name##_get_instance_private (Name *self) \ |