aboutsummaryrefslogtreecommitdiff
path: root/src/compat.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-05-22 14:43:07 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-05-22 14:43:07 +0200
commitb639c229e3fdef21cec4535284eeabbca361dad6 (patch)
tree075fdcdfdf08053a3075fda1d9602eaa2eee1aaa /src/compat.cpp
parente972ee3b65bc85dbee8e1e7f74594490037dcb67 (diff)
downloadlanes-b639c229e3fdef21cec4535284eeabbca361dad6.tar.gz
lanes-b639c229e3fdef21cec4535284eeabbca361dad6.tar.bz2
lanes-b639c229e3fdef21cec4535284eeabbca361dad6.zip
lua503_getfield → strong typed luaG_getfield
Diffstat (limited to 'src/compat.cpp')
-rw-r--r--src/compat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compat.cpp b/src/compat.cpp
index b45cce2..efc2ffd 100644
--- a/src/compat.cpp
+++ b/src/compat.cpp
@@ -14,12 +14,12 @@
14LuaType luaG_getmodule(lua_State* L_, char const* name_) 14LuaType luaG_getmodule(lua_State* L_, char const* name_)
15{ 15{
16 STACK_CHECK_START_REL(L_, 0); 16 STACK_CHECK_START_REL(L_, 0);
17 LuaType _type{ static_cast<LuaType>(lua503_getfield(L_, LUA_REGISTRYINDEX, LUA_LOADED_TABLE)) };// L_: _R._LOADED|nil 17 LuaType _type{ luaG_getfield(L_, LUA_REGISTRYINDEX, LUA_LOADED_TABLE) }; // L_: _R._LOADED|nil
18 if (_type != LuaType::TABLE) { // L_: _R._LOADED|nil 18 if (_type != LuaType::TABLE) { // L_: _R._LOADED|nil
19 STACK_CHECK(L_, 1); 19 STACK_CHECK(L_, 1);
20 return _type; 20 return _type;
21 } 21 }
22 _type = static_cast<LuaType>(lua503_getfield(L_, -1, name_)); // L_: _R._LOADED {module}|nil 22 _type = luaG_getfield(L_, -1, name_); // L_: _R._LOADED {module}|nil
23 lua_remove(L_, -2); // L_: {module}|nil 23 lua_remove(L_, -2); // L_: {module}|nil
24 STACK_CHECK(L_, 1); 24 STACK_CHECK(L_, 1);
25 return _type; 25 return _type;