From 93c90f1e05d4d7af463571215d75d2e5006d4e69 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 18 Apr 2014 10:33:15 +0800 Subject: [PATCH] cogl/cogl-gtype-private.h: Fix Build on non-GCC Commit 1b2dd815 (Registers gtypes for all public objects and structs) introduced GCCism's in its use of varargs, which broke the build of Cogl on other non-GCC compilers, such as Visual Studio. Define the COGL_GTYPE_DEFINE_BASE_CLASS and COGL_GTYPE_DEFINE_CLASS macros using ISO-style varargs so that the build of Cogl can be fixed on non-GCC compilers. Reviewed-by: Neil Roberts --- cogl/cogl-gtype-private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cogl/cogl-gtype-private.h b/cogl/cogl-gtype-private.h index 03832eff1..849838563 100644 --- a/cogl/cogl-gtype-private.h +++ b/cogl/cogl-gtype-private.h @@ -133,9 +133,9 @@ cogl_##name##_get_gtype (void) \ return type_id__volatile; \ } -#define COGL_GTYPE_DEFINE_BASE_CLASS(Name,name,interfaces...) \ - _COGL_GTYPE_DEFINE_BASE_CLASS_BEGIN(Name,name) \ - {interfaces;} \ +#define COGL_GTYPE_DEFINE_BASE_CLASS(Name,name,...) \ + _COGL_GTYPE_DEFINE_BASE_CLASS_BEGIN(Name,name) \ + {__VA_ARGS__;} \ _COGL_GTYPE_DEFINE_BASE_CLASS_END() #define _COGL_GTYPE_DEFINE_INTERFACE_EXTENDED_BEGIN(Name,name) \ @@ -230,7 +230,7 @@ cogl_##name##_get_gtype (void) \ } /* closes name##_get_type() */ -#define COGL_GTYPE_DEFINE_CLASS(Name,name,interfaces...) \ +#define COGL_GTYPE_DEFINE_CLASS(Name,name,...) \ typedef struct _Cogl##Name##Class Cogl##Name##Class; \ struct _Cogl##Name##Class { \ CoglObjectClass parent_class; \ @@ -239,7 +239,7 @@ cogl_##name##_get_gtype (void) \ cogl_##name, \ cogl_object_get_gtype(), \ 0) \ - {interfaces;} \ + {__VA_ARGS__;} \ _COGL_GTYPE_DEFINE_TYPE_EXTENDED_END() \ static void \ cogl_##name##_init (Cogl##Name *instance) \