util/u_debug: Fix DEBUG_NAMED_VALUE.

"#__symbol" doesn't work with nested macro expansions, at least not on gcc.
This commit is contained in:
José Fonseca 2012-11-13 10:23:11 +00:00
parent 94f9ea03a1
commit 35e28b4583
1 changed files with 1 additions and 1 deletions

View File

@ -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}