summaryrefslogtreecommitdiff
path: root/rest
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2009-05-15 14:35:21 +0100
committerRoss Burton <ross@linux.intel.com>2009-05-15 14:35:21 +0100
commit9a55fe0639c6d41ff00e914a61b072f0d98f0b4a (patch)
tree3d92dbf70932d5f4325b1027efaa18ddf463d11f /rest
parent2dca80c240303d371bd29bc51d63a316e7cbdf11 (diff)
downloadlibrest-9a55fe0639c6d41ff00e914a61b072f0d98f0b4a.tar.gz
Add a macro to do run-time debug enabled checks
Diffstat (limited to 'rest')
-rw-r--r--rest/rest-private.h4
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