Add internal versions of g_return_[val_]_if_fail

These are only enabled on debug=yes, so not by default
in released tarballs.
This commit is contained in:
Alexander Larsson 2012-12-03 13:25:14 +01:00
parent b4767ea9da
commit 5833b8495e

View File

@ -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);