[vte] debug: Completely eliminate debug code if --disable-debug



commit 7c76dbea6329bb79c1ca3c70a8fdc0595f50d98e
Author: Christian Persch <chpe gnome org>
Date:   Tue Dec 15 20:38:41 2015 +0100

    debug: Completely eliminate debug code if --disable-debug

 src/debug.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/debug.h b/src/debug.h
index 51b3b55..c211942 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -82,6 +82,7 @@ _vte_debug_on(guint flags)
 #define _VTE_DEBUG_IF(flags) if (0)
 #endif
 
+#ifdef VTE_DEBUG
 #if defined(__GNUC__) && G_HAVE_GNUC_VARARGS
 #define _vte_debug_print(flags, fmt, ...) \
        G_STMT_START { _VTE_DEBUG_IF(flags) g_printerr(fmt, ##__VA_ARGS__); } G_STMT_END
@@ -98,6 +99,9 @@ static void _vte_debug_print(guint flags, const char *fmt, ...)
        }
 }
 #endif
+#else
+#define _vte_debug_print(args...) do { } while(0)
+#endif /* VTE_DEBUG */
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]