diff options
author | Ross Burton <ross@linux.intel.com> | 2009-05-15 14:35:21 +0100 |
---|---|---|
committer | Ross Burton <ross@linux.intel.com> | 2009-05-15 14:35:21 +0100 |
commit | 9a55fe0639c6d41ff00e914a61b072f0d98f0b4a (patch) | |
tree | 3d92dbf70932d5f4325b1027efaa18ddf463d11f /rest | |
parent | 2dca80c240303d371bd29bc51d63a316e7cbdf11 (diff) | |
download | librest-9a55fe0639c6d41ff00e914a61b072f0d98f0b4a.tar.gz |
Add a macro to do run-time debug enabled checks
Diffstat (limited to 'rest')
-rw-r--r-- | rest/rest-private.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rest/rest-private.h b/rest/rest-private.h index f32db2e..444bf09 100644 --- a/rest/rest-private.h +++ b/rest/rest-private.h @@ -39,8 +39,10 @@ typedef enum extern guint rest_debug_flags; +#define REST_DEBUG_ENABLED(category) (rest_debug_flags & REST_DEBUG_##category) + #define REST_DEBUG(category,x,a...) G_STMT_START { \ - if (rest_debug_flags & REST_DEBUG_##category) \ + if (REST_DEBUG_ENABLED(category)) \ { g_message ("[" #category "] " G_STRLOC ": " x, ##a); } \ } G_STMT_END |