[glib] [gobject] Fix G_DEFINE_BOXED_TYPE compilation with C++



commit ea6e2968bfdee766c8d3d5fd5b5bac34bcaaaf3e
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Aug 11 19:02:14 2011 +0200

    [gobject] Fix G_DEFINE_BOXED_TYPE compilation with C++

 gobject/gtype.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
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) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]