diff --git a/src/globals.c b/src/globals.c index 176667f..7632523 100644 --- a/src/globals.c +++ b/src/globals.c @@ -6,8 +6,8 @@ #include "include/sdk.h" void* hw; -DECLARE_SYMBOLS(cl_enginefunc_t, engine); -DECLARE_SYMBOLS(cl_clientfunc_t, client); +DECL_INTF(cl_enginefunc_t, engine); +DECL_INTF(cl_clientfunc_t, client); bool globals_init(void) { /* diff --git a/src/include/globals.h b/src/include/globals.h index 0e000dc..b0e1cda 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -6,24 +6,27 @@ /*----------------------------------------------------------------------------*/ /* + * Macro for declaring interfaces and it's originals. + * Also extern version for the header. + * * prefix | meaning * -------+---------------- * gp_* | global pointer * go_* | global original */ -#define DECLARE_SYMBOLS(type, name) \ - type* gp_##name = NULL; \ +#define DECL_INTF(type, name) \ + type* gp_##name = NULL; \ type go_##name; -#define DECLARE_EXTERNS(type, name) \ - extern type* gp_##name; \ +#define DECL_INTF_EXTERN(type, name) \ + extern type* gp_##name; \ extern type go_##name; /*----------------------------------------------------------------------------*/ extern void* hw; -DECLARE_EXTERNS(cl_enginefunc_t, engine); -DECLARE_EXTERNS(cl_clientfunc_t, client); +DECL_INTF_EXTERN(cl_enginefunc_t, engine); +DECL_INTF_EXTERN(cl_clientfunc_t, client); /*----------------------------------------------------------------------------*/