diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-06 15:14:21 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-06 15:14:21 +0100 |
commit | b92dbd75b1c9988dcc83e5876e1ce2815145fa30 (patch) | |
tree | 81c0937808f43907ef1adad6c596755194ea6ee3 /src/linda.cpp | |
parent | 8b33e3022f0dd882a8aa11634cabdf7b5a2054fc (diff) | |
download | lanes-b92dbd75b1c9988dcc83e5876e1ce2815145fa30.tar.gz lanes-b92dbd75b1c9988dcc83e5876e1ce2815145fa30.tar.bz2 lanes-b92dbd75b1c9988dcc83e5876e1ce2815145fa30.zip |
New compatibility helper luaG_rawget
Diffstat (limited to 'src/linda.cpp')
-rw-r--r-- | src/linda.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/linda.cpp b/src/linda.cpp index 4f33899..a094a8f 100644 --- a/src/linda.cpp +++ b/src/linda.cpp | |||
@@ -417,8 +417,7 @@ static int linda_index_string(lua_State* L_) | |||
417 | // look in metatable first | 417 | // look in metatable first |
418 | lua_getmetatable(L_, kIdxSelf); // L_: linda "key" mt | 418 | lua_getmetatable(L_, kIdxSelf); // L_: linda "key" mt |
419 | lua_replace(L_, -3); // L_: mt "key" | 419 | lua_replace(L_, -3); // L_: mt "key" |
420 | lua_rawget(L_, -2); // L_: mt value | 420 | if (luaG_rawget(L_, StackIndex{ -2 }) != LuaType::NIL) { // found something? // L_: mt value |
421 | if (luaG_type(L_, kIdxTop) != LuaType::NIL) { // found something? | ||
422 | return 1; // done | 421 | return 1; // done |
423 | } | 422 | } |
424 | 423 | ||