diff options
author | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2011-05-26 16:58:01 +0100 |
---|---|---|
committer | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2011-06-01 16:41:33 +0100 |
commit | c7929ee79943f8c0408207c37895d4bc03aed094 (patch) | |
tree | 7c495be852fec142d7f3b78e03645f161268d60c | |
parent | cb25b3900d439e8a998e948c588d16a7888027a1 (diff) | |
download | telepathy-mission-control-c7929ee79943f8c0408207c37895d4bc03aed094.tar.gz |
define MCP_DEBUG for plugins to use
-rw-r--r-- | mission-control-plugins/debug-internal.h | 3 | ||||
-rw-r--r-- | mission-control-plugins/debug.h | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/mission-control-plugins/debug-internal.h b/mission-control-plugins/debug-internal.h index d150e6c7..c02e86b7 100644 --- a/mission-control-plugins/debug-internal.h +++ b/mission-control-plugins/debug-internal.h @@ -33,8 +33,7 @@ #ifdef ENABLE_DEBUG #define DEBUG(format, ...) \ - if (mcp_debugging (MCP_DEBUG_TYPE)) \ - g_debug ("%s: " format, G_STRLOC, ##__VA_ARGS__) + MCP_DEBUG (MCP_DEBUG_TYPE, format, ##__VA_ARGS__) #else diff --git a/mission-control-plugins/debug.h b/mission-control-plugins/debug.h index 14a52099..909631c1 100644 --- a/mission-control-plugins/debug.h +++ b/mission-control-plugins/debug.h @@ -21,6 +21,14 @@ #ifndef MCP_DEBUG_H #define MCP_DEBUG_H +#ifndef _MCP_IN_MISSION_CONTROL_PLUGINS_H +#error Use <mission-control-plugins/mission-control-plugins.h> instead +#endif + +#define MCP_DEBUG(_type, _fmt, ...) \ + G_STMT_START { if (mcp_is_debugging (_type)) \ + g_debug ("%s: " _fmt, G_STRLOC, ##__VA_ARGS__); } G_STMT_END + G_BEGIN_DECLS typedef enum { |