aboutsummaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2018-11-19 09:16:49 +0100
committerBenoit Germain <bnt.germain@gmail.com>2018-11-19 09:16:49 +0100
commit7b4f59c5ebc84e426e2876906b24d7dd73342f07 (patch)
treef05748fc2d75c43c25865be01677271fff5d86e4 /src/tools.h
parent01f83215a2ad235fbf306f591c6c0547b1bb7047 (diff)
downloadlanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.tar.gz
lanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.tar.bz2
lanes-7b4f59c5ebc84e426e2876906b24d7dd73342f07.zip
Internal code tweaks
* Registry access code utility macros * CONFIG_REGKEY and LOOKUP_REGKEY are now lightuserdata instead of strings * Stack checking debug macros improvements
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h11
1 files changed, 8 insertions, 3 deletions
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;
18#define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d)) 18#define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d))
19#define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i)) 19#define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i))
20 20
21void luaG_dump( lua_State* L ); 21#ifdef _DEBUG
22void luaG_dump( lua_State* L);
23#endif // _DEBUG
22 24
23lua_State* luaG_newstate( Universe* U, lua_State* _from, char const* libs); 25lua_State* luaG_newstate( Universe* U, lua_State* _from, char const* libs);
24 26
@@ -39,7 +41,10 @@ void call_on_state_create( Universe* U, lua_State* L, lua_State* from_, LookupMo
39 41
40// ################################################################################################ 42// ################################################################################################
41 43
42extern char const* const CONFIG_REGKEY; 44// crc64/we of string "CONFIG_REGKEY" generated at http://www.nitrxgen.net/hashgen/
43extern char const* const LOOKUP_REGKEY; 45static DECLARE_CONST_UNIQUE_KEY( CONFIG_REGKEY, 0x31cd24894eae8624); // 'cancel_error' sentinel
46
47// crc64/we of string "LOOKUP_REGKEY" generated at http://www.nitrxgen.net/hashgen/
48static DECLARE_CONST_UNIQUE_KEY( LOOKUP_REGKEY, 0x5051ed67ee7b51a1); // 'cancel_error' sentinel
44 49
45#endif // __LANES_TOOLS_H__ 50#endif // __LANES_TOOLS_H__