diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-12-03 13:25:14 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2012-12-04 20:16:44 +0100 |
commit | 5833b8495e77b6b21af5a996feec5c4c6c7925ed (patch) | |
tree | ce1c14307f23df3342aeffcda29be99d676bcf30 /gtk/gtkprivate.h | |
parent | b4767ea9da5fafe30fdc695287feeb6e4bdcc454 (diff) | |
download | gtk+-5833b8495e77b6b21af5a996feec5c4c6c7925ed.tar.gz |
Add internal versions of g_return_[val_]_if_fail
These are only enabled on debug=yes, so not by default
in released tarballs.
Diffstat (limited to 'gtk/gtkprivate.h')
-rw-r--r-- | gtk/gtkprivate.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index 746103dc4a..5b05f5bb47 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -37,6 +37,16 @@ G_BEGIN_DECLS #define GTK_PARAM_WRITABLE G_PARAM_WRITABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB #define GTK_PARAM_READWRITE G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB +#ifdef G_DISABLE_CAST_CHECKS +/* This is true for debug no and minimum */ +#define gtk_internal_return_if_fail(__expr) G_STMT_START{ (void)0; }G_STMT_END +#define gtk_internal_return_val_if_fail(__expr, __val) G_STMT_START{ (void)0; }G_STMT_END +#else +/* This is true for debug yes */ +#define gtk_internal_return_if_fail(__expr) g_return_if_fail(__expr) +#define gtk_internal_return_val_if_fail(__expr, __val) g_return_val_if_fail(__expr, __val) +#endif + const gchar * _gtk_get_datadir (void); const gchar * _gtk_get_libdir (void); const gchar * _gtk_get_sysconfdir (void); |