summaryrefslogtreecommitdiff
path: root/gtk/gtkobject.h
diff options
context:
space:
mode:
authorTim Janik <timj@gimp.org>1998-03-07 20:32:59 +0000
committerTim Janik <timj@src.gnome.org>1998-03-07 20:32:59 +0000
commit124d1e5caae190e620307a69f92bd5b93664bf75 (patch)
treef30e71f7ce04660e4056d5bcf0bf476c196b4aa8 /gtk/gtkobject.h
parent640c75216d1545e7633ba5653a141c58ebbc53a6 (diff)
downloadgtk+-124d1e5caae190e620307a69f92bd5b93664bf75.tar.gz
made the object/class cast checks much more descriptive, based on
Sat Mar 7 20:20:53 1998 Tim Janik <timj@gimp.org> * gtk/gtkobject.c: (gtk_object_check_cast): (gtk_object_check_class_cast): made the object/class cast checks much more descriptive, based on gtk-draco-980305-2.patch.gz and gtk-draco-980306-1.patch.gz but optimized for common code path. * gtk/gtkpreview.c: added a few extra checks for the visual (gtk-draco-980305-0.patch.gz). * gdk/gdk.c (gdk_signal): abort() on a signal if G_ENABLE_DEBUG is defined, so we dump core (gtk-draco-980305-0.patch.gz).
Diffstat (limited to 'gtk/gtkobject.h')
-rw-r--r--gtk/gtkobject.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h
index e7ac103849..ef77a91db6 100644
--- a/gtk/gtkobject.h
+++ b/gtk/gtkobject.h
@@ -42,17 +42,17 @@ extern "C" {
#else /* !GTK_NO_CHECK_CASTS */
#define GTK_CHECK_CAST(obj,cast_type,cast) \
- ((cast*) gtk_object_check_cast ((GtkObject*) (obj), cast_type))
+ ((cast*) gtk_object_check_cast ((GtkObject*) (obj), (cast_type)))
#define GTK_CHECK_CLASS_CAST(klass,cast_type,cast) \
- ((cast*) gtk_object_check_class_cast ((GtkObjectClass*) (klass), cast_type))
+ ((cast*) gtk_object_check_class_cast ((GtkObjectClass*) (klass), (cast_type)))
#endif /* GTK_NO_CHECK_CASTS */
/* Determines whether 'obj' is a type of 'otype'.
*/
-#define GTK_CHECK_TYPE(obj,otype) (gtk_type_is_a (((GtkObject*) (obj))->klass->type, otype))
+#define GTK_CHECK_TYPE(obj,otype) (gtk_type_is_a (((GtkObject*) (obj))->klass->type, (otype)))
/* Macro for casting a pointer to a GtkObject pointer.