Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
Dom Lachowicz authored and Tim Janik committed Sep 12, 2002
1 parent f3f724f commit 47ded40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions gobject/ChangeLog
Original file line number Diff line number Diff line change
@@ -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>

* gvaluetransform.c: Fix problems with excess ';'
Expand Down
8 changes: 4 additions & 4 deletions gobject/gtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 47ded40

Please sign in to comment.