Problem with macros
#1

Hello. I'm modularising my code and I need to create some quasinamespaces, so this is what I've got currently.

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_
This works fairly well, but now I need to add namespace to global module variables. When I add

pawn Код:
#define NS.%0   _NS_:%0
I get macro redefinition error. How can I use single macro for functions and variables?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)