From ea6e2968bfdee766c8d3d5fd5b5bac34bcaaaf3e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 11 Aug 2011 19:02:14 +0200 Subject: [PATCH] [gobject] Fix G_DEFINE_BOXED_TYPE compilation with C++ --- gobject/gtype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gtype.h b/gobject/gtype.h index b52bdf3..89548e9 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -1537,7 +1537,7 @@ type_name##_get_type (void) \ */ #define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +#if !defined (__cplusplus) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) #define _G_DEFINE_BOXED_TYPE_BEGIN(TypeName, type_name, copy_func, free_func) \ GType \ type_name##_get_type (void) \ -- 2.7.4