Rename globals' macros
DECLARE -> DECL SYMBOLS -> INTF EXTERNS -> EXTERN
This commit is contained in:
parent
f395bb1efd
commit
68c30891a8
|
@ -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) {
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue