[Cogl] [Patch][Cogl-1.18]: Fix build Cogl on non-GCC
Neil Roberts
neil at linux.intel.com
Wed Apr 16 03:46:48 PDT 2014
Fan Chun-wei writes:
> In commit 1b2dd81 (Registers gtypes for all public objects and
> structs), varargs were used in macros for COGL_GTYPE_DEFINE_CLASS and
> COGL_GTYPE_DEFINE_BASE_CLASS (in cogl/cogl-gtype-private.h) in order
> to facilitate the definition of *_get_gtype() functions, which are
> needed for introspection. This, however, introduced GCCisms, so that
> builds on non-GCC are boken. This patch defines these two macros for
> non-GCC, using GLib's G_HAVE_GNUC_VARARGS (for GCC) and
> G_HAVE_ISO_VARARGS (for non-GCC, such as Visual Studio), in a manner
> not unlike deps/glib/gmessage.h, so that the build on non-GCC can be
> fixed.
Is there any reason to use the GCC version of varargs instead of the ISO
standard? Perhaps it would be better to just always use the ISO version
to make the code a bit cleaner.
Regards,
- Neil
More information about the Cogl
mailing list