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"
This commit is contained in:
Dom Lachowicz
2002-09-12 04:03:54 +00:00
committed by Tim Janik
parent 3afc93f1aa
commit 3a109829a8
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
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"
Fri Jul 26 15:46:36 2002 Owen Taylor <otaylor@redhat.com> Fri Jul 26 15:46:36 2002 Owen Taylor <otaylor@redhat.com>
* gvaluetransform.c: Fix problems with excess ';' * gvaluetransform.c: Fix problems with excess ';'

View File

@@ -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_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)) #define _G_TYPE_IGI(ip, gt, ct) ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt))
#ifdef __GNUC__ #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; \ GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
if (__inst && __inst->g_class && __inst->g_class->g_type == __t) \ if (__inst && __inst->g_class && __inst->g_class->g_type == __t) \
__r = TRUE; \ __r = TRUE; \
else \ else \
__r = g_type_check_instance_is_a (__inst, __t); \ __r = g_type_check_instance_is_a (__inst, __t); \
__r; \ __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; \ GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \
if (__class && __class->g_type == __t) \ if (__class && __class->g_type == __t) \
__r = TRUE; \ __r = TRUE; \
else \ else \
__r = g_type_check_class_is_a (__class, __t); \ __r = g_type_check_class_is_a (__class, __t); \
__r; \ __r; \
}) }))
#else /* !__GNUC__ */ #else /* !__GNUC__ */
# define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt)) # 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)) # define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt))