summaryrefslogtreecommitdiff
path: root/gtk/gtksizerequest.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-09-08 21:06:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-09-09 06:32:46 -0400
commitbf9a72976fed44d7ffc074896c8e948d975e94b6 (patch)
tree584bf3d25226be6904781f10763d4647a1d17e4d /gtk/gtksizerequest.c
parentf114d9c82405a1a5575e65c0f960b5c2b47b6259 (diff)
downloadgtk+-bf9a72976fed44d7ffc074896c8e948d975e94b6.tar.gz
size request: Redo the recursion checks
Use G_ENABLE_CONSISTENCY checks for the recursion checks in gtksizerequest.c
Diffstat (limited to 'gtk/gtksizerequest.c')
-rw-r--r--gtk/gtksizerequest.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index dc075cdd78..8fe24cb5b7 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -32,16 +32,14 @@
#include "deprecated/gtkstyle.h"
-#ifndef G_DISABLE_CHECKS
+#ifdef G_ENABLE_CONSISTENCY_CHECKS
static GQuark recursion_check_quark = 0;
-#endif /* G_DISABLE_CHECKS */
static void
push_recursion_check (GtkWidget *widget,
GtkOrientation orientation,
gint for_size)
{
-#ifndef G_DISABLE_CHECKS
const char *previous_method;
const char *method;
@@ -71,17 +69,18 @@ push_recursion_check (GtkWidget *widget,
}
g_object_set_qdata (G_OBJECT (widget), recursion_check_quark, (char*) method);
-#endif /* G_DISABLE_CHECKS */
}
static void
pop_recursion_check (GtkWidget *widget,
GtkOrientation orientation)
{
-#ifndef G_DISABLE_CHECKS
g_object_set_qdata (G_OBJECT (widget), recursion_check_quark, NULL);
-#endif
}
+#else
+#define push_recursion_check(widget, orientation, for_size)
+#define pop_recursion_check(widget, orientation)
+#endif /* G_ENABLE_CONSISTENCY_CHECKS */
static const char *
get_vfunc_name (GtkOrientation orientation,