summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2011-08-11 19:02:14 +0200
committerBehdad Esfahbod <behdad@behdad.org>2011-08-11 19:03:02 +0200
commitea6e2968bfdee766c8d3d5fd5b5bac34bcaaaf3e (patch)
tree2e79978bc870c1171fcb3aadf1de612948e1c661 /gobject
parentc3fd789bb759aefb6fda144b953c2d09fc0dc20d (diff)
[gobject] Fix G_DEFINE_BOXED_TYPE compilation with C++
Diffstat (limited to 'gobject')
-rw-r--r--gobject/gtype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gobject/gtype.h b/gobject/gtype.h
index b52bdf37a..89548e920 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) \