summaryrefslogtreecommitdiff
path: root/gobject/gtype.h
diff options
context:
space:
mode:
authorDom Lachowicz <cinamod@hotmail.com>2002-09-12 04:03:54 +0000
committerTim Janik <timj@src.gnome.org>2002-09-12 04:03:54 +0000
commit3a109829a859ba578dd7b18a25c91eaeddd57579 (patch)
tree4c49cb2726e6560b9348479d023f01022aa054d5 /gobject/gtype.h
parent3afc93f1aa848798c56be46efd6bdc0397c8fac5 (diff)
downloadglib-3a109829a859ba578dd7b18a25c91eaeddd57579.tar.gz
Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups
Wed Sep 11 16:50:20 2002 Dom Lachowicz <cinamod@hotmail.com> * gtype.h: Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups within expressions"
Diffstat (limited to 'gobject/gtype.h')
-rw-r--r--gobject/gtype.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gobject/gtype.h b/gobject/gtype.h
index c3d23573b..9c9ea0910 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -352,22 +352,22 @@ G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class);
#define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class))
#define _G_TYPE_IGI(ip, gt, ct) ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt))
#ifdef __GNUC__
-# define _G_TYPE_CIT(ip, gt) ({ \
+# define _G_TYPE_CIT(ip, gt) (G_GNUC_EXTENSION ({ \
GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
if (__inst && __inst->g_class && __inst->g_class->g_type == __t) \
__r = TRUE; \
else \
__r = g_type_check_instance_is_a (__inst, __t); \
__r; \
-})
-# define _G_TYPE_CCT(cp, gt) ({ \
+}))
+# define _G_TYPE_CCT(cp, gt) (G_GNUC_EXTENSION ({ \
GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \
if (__class && __class->g_type == __t) \
__r = TRUE; \
else \
__r = g_type_check_class_is_a (__class, __t); \
__r; \
-})
+}))
#else /* !__GNUC__ */
# define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt))
# define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt))