[Cogl] [PATCH] Don't use the internal _G_DEFINE_TYPE_EXTENDED_CLASS_INIT macro
Robert Bragg
robert at sixbynine.org
Fri Mar 21 10:37:13 PDT 2014
This looks good to land to me:
Reviewed-by: Robert Bragg <robert.bragg at intel.com>
thanks,
Robert
On Fri, Mar 21, 2014 at 5:32 PM, Neil Roberts <neil at linux.intel.com> wrote:
> 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.
> ---
> cogl/cogl-gtype-private.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/cogl/cogl-gtype-private.h b/cogl/cogl-gtype-private.h
> index 21590da..03832ef 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) \
> --
> 1.8.5.3
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list