From 35e28b4583fdb206dc6b2dd49412362dc6a51953 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 13 Nov 2012 10:23:11 +0000 Subject: [PATCH] util/u_debug: Fix DEBUG_NAMED_VALUE. "#__symbol" doesn't work with nested macro expansions, at least not on gcc. --- src/gallium/auxiliary/util/u_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index 14d319c2cf1..3b42c2f07f7 100644 --- a/src/gallium/auxiliary/util/u_debug.h +++ b/src/gallium/auxiliary/util/u_debug.h @@ -275,7 +275,7 @@ struct debug_named_value * ... * @endcode */ -#define DEBUG_NAMED_VALUE(__symbol) DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, NULL) +#define DEBUG_NAMED_VALUE(__symbol) {#__symbol, (unsigned long)__symbol, NULL} #define DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, __desc) {#__symbol, (unsigned long)__symbol, __desc} #define DEBUG_NAMED_VALUE_END {NULL, 0, NULL} -- 2.30.2