diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-21 15:41:54 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-21 15:41:54 +0100 |
commit | f0170ce8f1a90337637d387b87280f121d0578fe (patch) | |
tree | 32065aa3470b54e6058e5f47e4931171b7ec28f2 /src/macros_and_utils.h | |
parent | 0b13436b835ea96ecdf930a380e9e5c8add8cb45 (diff) | |
download | lanes-f0170ce8f1a90337637d387b87280f121d0578fe.tar.gz lanes-f0170ce8f1a90337637d387b87280f121d0578fe.tar.bz2 lanes-f0170ce8f1a90337637d387b87280f121d0578fe.zip |
C++ migration: REGISTRY_SET and REGISTRY_GET are gone, welcome templates and lambdas
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r-- | src/macros_and_utils.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index ae93e97..67213bc 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h | |||
@@ -80,18 +80,4 @@ extern char const* debugspew_indent; | |||
80 | 80 | ||
81 | #define STACK_GROW( L, n) do { if (!lua_checkstack(L,(int)(n))) luaL_error( L, "Cannot grow stack!" ); } while( 0) | 81 | #define STACK_GROW( L, n) do { if (!lua_checkstack(L,(int)(n))) luaL_error( L, "Cannot grow stack!" ); } while( 0) |
82 | 82 | ||
83 | // non-string keyed registry access | ||
84 | #define REGISTRY_SET( L, key_, value_) \ | ||
85 | { \ | ||
86 | key_.push(L); \ | ||
87 | value_; \ | ||
88 | lua_rawset( L, LUA_REGISTRYINDEX); \ | ||
89 | } | ||
90 | |||
91 | #define REGISTRY_GET( L, key_) \ | ||
92 | { \ | ||
93 | key_.push(L); \ | ||
94 | lua_rawget( L, LUA_REGISTRYINDEX); \ | ||
95 | } | ||
96 | |||
97 | #define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) | 83 | #define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) |