From 32d9e53dd9287eb0a77704c28a6211a27e70f8c7 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Mon, 5 Jan 2015 09:04:31 +1000 Subject: [PATCH] add macro for checking if the current function will output debug info --- lib/rb-debug.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rb-debug.h b/lib/rb-debug.h index bcdbe48e0..7515af779 100644 --- a/lib/rb-debug.h +++ b/lib/rb-debug.h @@ -36,8 +36,10 @@ G_BEGIN_DECLS #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define rb_debug(...) rb_debug_realf (__func__, __FILE__, __LINE__, TRUE, __VA_ARGS__) +#define rb_debug_here() rb_debug_matches (__func__, __FILE__) #elif defined(__GNUC__) && __GNUC__ >= 3 #define rb_debug(...) rb_debug_realf (__FUNCTION__, __FILE__, __LINE__, TRUE, __VA_ARGS__) +#define rb_debug_here() rb_debug_matches (__FUNCTION__, __FILE__) #else #define rb_debug #endif