summaryrefslogtreecommitdiff
path: root/src/mcd-debug.h
diff options
context:
space:
mode:
authorAlberto Mardegan <alberto.mardegan@nokia.com>2009-02-26 11:43:23 +0200
committerAlberto Mardegan <alberto.mardegan@nokia.com>2009-02-26 11:43:23 +0200
commit19532240ff7500a559f3e929162e3dabb822d78a (patch)
tree1e9a58c3fc9ae17b114b69d14df76e773e279c42 /src/mcd-debug.h
parent6c1967f5748b4d99b13c007b28097341745df97f (diff)
downloadtelepathy-mission-control-19532240ff7500a559f3e929162e3dabb822d78a.tar.gz
Allow inlining
The debug level variable must be exported, for the _mcd_debug_get_level() to be inlined.
Diffstat (limited to 'src/mcd-debug.h')
-rw-r--r--src/mcd-debug.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mcd-debug.h b/src/mcd-debug.h
index 93f217e1..405892fb 100644
--- a/src/mcd-debug.h
+++ b/src/mcd-debug.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
#ifdef ENABLE_DEBUG
#define DEBUG(format, ...) do { \
- if (mcd_debug_get_level () > 0) \
+ if (_mcd_debug_get_level () > 0) \
g_debug (format, ##__VA_ARGS__); \
} while (0)
@@ -50,10 +50,15 @@ G_BEGIN_DECLS
#endif /* ENABLE_DEBUG */
+extern gint mcd_debug_level;
+
void mcd_debug_init (void);
void mcd_debug_set_level (gint level);
-inline gint mcd_debug_get_level (void);
+static inline gint _mcd_debug_get_level (void)
+{
+ return mcd_debug_level;
+}
gpointer mcd_debug_ref (gpointer obj, const gchar *filename, gint linenum);
void mcd_debug_unref (gpointer obj, const gchar *filename, gint linenum);