diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-02 18:50:40 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-02 18:50:40 +0200 |
commit | a2824ef0c87034d535d3b12e6d582dfcf2265f27 (patch) | |
tree | 4cd1def6d11df8d5c715b51f338b090bb299b7cd /src/tools.cpp | |
parent | eb7c7611524ba2dd2324aa3c72142e6973912286 (diff) | |
download | lanes-a2824ef0c87034d535d3b12e6d582dfcf2265f27.tar.gz lanes-a2824ef0c87034d535d3b12e6d582dfcf2265f27.tar.bz2 lanes-a2824ef0c87034d535d3b12e6d582dfcf2265f27.zip |
Remove dependency on _G["package"]
Diffstat (limited to '')
-rw-r--r-- | src/tools.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools.cpp b/src/tools.cpp index a55ee75..049a065 100644 --- a/src/tools.cpp +++ b/src/tools.cpp | |||
@@ -1826,12 +1826,11 @@ void InterCopyContext::inter_copy_keyvaluepair() const | |||
1826 | STACK_CHECK(L1, 1); | 1826 | STACK_CHECK(L1, 1); |
1827 | // raise the error when copying from lane to lane, else just leave it on the stack to be raised later | 1827 | // raise the error when copying from lane to lane, else just leave it on the stack to be raised later |
1828 | if (mode == LookupMode::LaneBody) { | 1828 | if (mode == LookupMode::LaneBody) { |
1829 | raise_lua_error(getErrL()); | 1829 | raise_lua_error(getErrL()); // that's ok, getErrL() is L1 in that case |
1830 | } | 1830 | } |
1831 | return InterCopyResult::Error; | 1831 | return InterCopyResult::Error; |
1832 | } | 1832 | } |
1833 | lua_getglobal(L2, "package"); // TODO: use _R._LOADED.package instead of _G.package | 1833 | if (luaG_getpackage(L2) == LUA_TNIL) { // package library not loaded: do nothing |
1834 | if (lua_isnil(L2, -1)) { // package library not loaded: do nothing | ||
1835 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "'package' not loaded, nothing to do\n" INDENT_END(U))); | 1834 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "'package' not loaded, nothing to do\n" INDENT_END(U))); |
1836 | STACK_CHECK(L1, 0); | 1835 | STACK_CHECK(L1, 0); |
1837 | return InterCopyResult::Success; | 1836 | return InterCopyResult::Success; |