gtkprivate: Only define gtk_internal_return_if* for consistency checks

The wanted behavior here is that these are only defined if the buildtype
is debug, i.e. full debugging.
This commit is contained in:
Timm Bäder 2019-08-19 10:54:09 +02:00
parent 4b4b77ca04
commit 0f9a02e6f4

View File

@ -40,12 +40,12 @@ G_BEGIN_DECLS
#define OPPOSITE_ORIENTATION(_orientation) (1 - (_orientation)) #define OPPOSITE_ORIENTATION(_orientation) (1 - (_orientation))
#ifdef G_DISABLE_CAST_CHECKS #ifndef G_ENABLE_CONSISTENCY_CHECKS
/* This is true for debug no and minimum */ /* This is true for buildtypes release and debugoptimized */
#define gtk_internal_return_if_fail(__expr) G_STMT_START{ (void)0; }G_STMT_END #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 #define gtk_internal_return_val_if_fail(__expr, __val) G_STMT_START{ (void)0; }G_STMT_END
#else #else
/* This is true for debug yes */ /* This is true for debug builds */
#define gtk_internal_return_if_fail(__expr) g_return_if_fail(__expr) #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) #define gtk_internal_return_val_if_fail(__expr, __val) g_return_val_if_fail(__expr, __val)
#endif #endif