[telepathy-mission-control/master] mcd-debug.h: add DEBUGGING
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 27 11:50:18 PDT 2009
This lets us avoid potentially costly debug actions (like iterating
over a hash table or doing g_strdup_value_contents) when we're not
actually going to output them anyway.
---
src/mcd-debug.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mcd-debug.h b/src/mcd-debug.h
index cce9c2a..180586a 100644
--- a/src/mcd-debug.h
+++ b/src/mcd-debug.h
@@ -35,6 +35,7 @@ G_BEGIN_DECLS
#ifdef ENABLE_DEBUG
+#define DEBUGGING (_mcd_debug_get_level () > 0)
#define DEBUG(format, ...) G_STMT_START { \
if (_mcd_debug_get_level () > 0) \
g_debug ("%s: " format, G_STRFUNC, ##__VA_ARGS__); \
@@ -48,6 +49,7 @@ G_BEGIN_DECLS
#else /* !defined ENABLE_DEBUG */
+#define DEBUGGING (0)
#define DEBUG(format, ...) do {} while (0)
#endif /* ENABLE_DEBUG */
--
1.5.6.5
More information about the telepathy-commits
mailing list