From 1ddcdb0524fe524aaafd7bbcd51f255a2087cd97 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 27 Apr 2005 11:59:37 +0000 Subject: [PATCH] Added PREFIX_OBJECT() function to be able to easily prepend any string to the object name in order to generate e.g. per-file variables. --- src/include/compiler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/compiler.h b/src/include/compiler.h index 6aa1f9e7..4fe4f025 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -12,7 +12,8 @@ #define _H1( x, y ) x ## y #undef _H2 #define _H2( x, y ) _H1 ( x, y ) -#define OBJECT_SYMBOL _H2 ( obj_, OBJECT ) +#define PREFIX_OBJECT(prefix) _H2 ( prefix, OBJECT ) +#define OBJECT_SYMBOL PREFIX_OBJECT(obj_) #undef _STR #define _STR(s) #s #undef _XSTR @@ -43,7 +44,7 @@ __asm__ ( ".equ\t" OBJECT_SYMBOL_STR ", 0" ); * DEBUG_LEVEL will be inserted into the object file. * */ -#define DEBUG_SYMBOL _H2 ( debug_, OBJECT ) +#define DEBUG_SYMBOL PREFIX_OBJECT(debug_) #if DEBUG_SYMBOL #include "console.h"