From 218bc52c7f30cbc358e80ea8ca7391f8833e1d44 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 6 May 2011 11:35:36 +0300 Subject: [PATCH] info: avoid redefinition of symbols when debugging is off The refactoring of gst_debug_add_log_function() now causes build failure when debug-logging is turned off. Just move it to the conditional part of the header. --- gst/gstinfo.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 65f8435..264aefc 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -341,20 +341,6 @@ void gst_debug_add_log_function (GstLogFunction func, guint gst_debug_remove_log_function (GstLogFunction func); guint gst_debug_remove_log_function_by_data (gpointer data); -#define gst_debug_add_log_function(func,data) \ -G_STMT_START{ \ - if (func == gst_debug_log_default) { \ - gst_debug_add_log_function(NULL,data); \ - } else { \ - gst_debug_add_log_function(func,data); \ - } \ -}G_STMT_END - -#define gst_debug_remove_log_function(func) \ - (func == gst_debug_log_default) ? \ - gst_debug_remove_log_function(NULL) : \ - gst_debug_remove_log_function(func) - void gst_debug_set_active (gboolean active); gboolean gst_debug_is_active (void); @@ -387,6 +373,20 @@ gint gst_debug_construct_win_color (guint colorinfo); #ifndef GST_DISABLE_GST_DEBUG +#define gst_debug_add_log_function(func,data) \ +G_STMT_START{ \ + if (func == gst_debug_log_default) { \ + gst_debug_add_log_function(NULL,data); \ + } else { \ + gst_debug_add_log_function(func,data); \ + } \ +}G_STMT_END + +#define gst_debug_remove_log_function(func) \ + (func == gst_debug_log_default) ? \ + gst_debug_remove_log_function(NULL) : \ + gst_debug_remove_log_function(func) + /** * GST_DEBUG_CATEGORY: * @cat: the category @@ -497,7 +497,7 @@ extern gboolean __gst_debug_enabled; /* since 0.10.7, the min debug level, used for quickly discarding debug * messages that fall under the threshold. */ -GST_EXPORT GstDebugLevel __gst_debug_min; +GST_EXPORT GstDebugLevel __gst_debug_min; /** * GST_CAT_LEVEL_LOG: -- 2.7.4