From 7b4f59c5ebc84e426e2876906b24d7dd73342f07 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 19 Nov 2018 09:16:49 +0100 Subject: Internal code tweaks * Registry access code utility macros * CONFIG_REGKEY and LOOKUP_REGKEY are now lightuserdata instead of strings * Stack checking debug macros improvements --- src/tools.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/tools.h') diff --git a/src/tools.h b/src/tools.h index 84e323c..ca0b9fc 100644 --- a/src/tools.h +++ b/src/tools.h @@ -18,7 +18,9 @@ typedef struct s_Universe Universe; #define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d)) #define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i)) -void luaG_dump( lua_State* L ); +#ifdef _DEBUG +void luaG_dump( lua_State* L); +#endif // _DEBUG lua_State* luaG_newstate( Universe* U, lua_State* _from, char const* libs); @@ -39,7 +41,10 @@ void call_on_state_create( Universe* U, lua_State* L, lua_State* from_, LookupMo // ################################################################################################ -extern char const* const CONFIG_REGKEY; -extern char const* const LOOKUP_REGKEY; +// crc64/we of string "CONFIG_REGKEY" generated at http://www.nitrxgen.net/hashgen/ +static DECLARE_CONST_UNIQUE_KEY( CONFIG_REGKEY, 0x31cd24894eae8624); // 'cancel_error' sentinel + +// crc64/we of string "LOOKUP_REGKEY" generated at http://www.nitrxgen.net/hashgen/ +static DECLARE_CONST_UNIQUE_KEY( LOOKUP_REGKEY, 0x5051ed67ee7b51a1); // 'cancel_error' sentinel #endif // __LANES_TOOLS_H__ -- cgit v1.2.3-55-g6feb