Explorar el Código

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.
tags/v0.9.3
Michael Brown hace 19 años
padre
commit
1ddcdb0524
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3
    2
      src/include/compiler.h

+ 3
- 2
src/include/compiler.h Ver fichero

@@ -12,7 +12,8 @@
12 12
 #define _H1( x, y ) x ## y
13 13
 #undef _H2
14 14
 #define _H2( x, y ) _H1 ( x, y )
15
-#define OBJECT_SYMBOL _H2 ( obj_, OBJECT )
15
+#define PREFIX_OBJECT(prefix) _H2 ( prefix, OBJECT )
16
+#define OBJECT_SYMBOL PREFIX_OBJECT(obj_)
16 17
 #undef _STR
17 18
 #define _STR(s) #s
18 19
 #undef _XSTR
@@ -43,7 +44,7 @@ __asm__ ( ".equ\t" OBJECT_SYMBOL_STR ", 0" );
43 44
  * DEBUG_LEVEL will be inserted into the object file.
44 45
  *
45 46
  */
46
-#define DEBUG_SYMBOL _H2 ( debug_, OBJECT )
47
+#define DEBUG_SYMBOL PREFIX_OBJECT(debug_)
47 48
 
48 49
 #if DEBUG_SYMBOL
49 50
 #include "console.h"

Loading…
Cancelar
Guardar