[cogl/cogl-1.18] cogl/cogl-gtype-private.h: Fix Build on non-GCC
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.18] cogl/cogl-gtype-private.h: Fix Build on non-GCC
- Date: Tue, 22 Apr 2014 10:27:24 +0000 (UTC)
commit 93c90f1e05d4d7af463571215d75d2e5006d4e69
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Apr 18 10:33:15 2014 +0800
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 <neil linux intel com>
cogl/cogl-gtype-private.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/cogl/cogl-gtype-private.h b/cogl/cogl-gtype-private.h
index 03832ef..8498385 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) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]