From 68c30891a8a3fd177b774a9e95775266838f6eb3 Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Thu, 20 Jul 2023 16:38:02 +0200 Subject: [PATCH] Rename globals' macros DECLARE -> DECL SYMBOLS -> INTF EXTERNS -> EXTERN --- src/globals.c | 4 ++-- src/include/globals.h | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) 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); /*----------------------------------------------------------------------------*/