01.09.2012, 12:20
Hello. I'm modularising my code and I need to create some quasinamespaces, so this is what I've got currently.
This works fairly well, but now I need to add namespace to global module variables. When I add
I get macro redefinition error. How can I use single macro for functions and variables?
pawn Код:
//Main file
#define NS->%0(%1) _NS_:%0(%1)
//Module file
#define _NS_: Path@To@Module@
stock NS->Pancakes(something) {
return 1;
}
#undef _NS_
pawn Код:
#define NS.%0 _NS_:%0