diff options
Diffstat (limited to '')
-rw-r--r-- | src/intercopycontext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index b2eda83..fcec38a 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp | |||
@@ -262,12 +262,12 @@ void InterCopyContext::copy_func() const | |||
262 | { | 262 | { |
263 | InterCopyContext _c{ U, L2, L1, L2_cache_i, {}, VT::NORMAL, mode, {} }; | 263 | InterCopyContext _c{ U, L2, L1, L2_cache_i, {}, VT::NORMAL, mode, {} }; |
264 | // if we encounter an upvalue equal to the global table in the source, bind it to the destination's global table | 264 | // if we encounter an upvalue equal to the global table in the source, bind it to the destination's global table |
265 | lua_pushglobaltable(L1); // L1: ... _G | 265 | luaG_pushglobaltable(L1); // L1: ... _G |
266 | for (_n = 0; (_c.name = lua_getupvalue(L1, L1_i, 1 + _n)) != nullptr; ++_n) { // L1: ... _G up[n] | 266 | for (_n = 0; (_c.name = lua_getupvalue(L1, L1_i, 1 + _n)) != nullptr; ++_n) { // L1: ... _G up[n] |
267 | DEBUGSPEW_CODE(DebugSpew(U) << "UPNAME[" << _n << "]: " << _c.name << " -> "); | 267 | DEBUGSPEW_CODE(DebugSpew(U) << "UPNAME[" << _n << "]: " << _c.name << " -> "); |
268 | if (lua_rawequal(L1, -1, -2)) { // is the upvalue equal to the global table? | 268 | if (lua_rawequal(L1, -1, -2)) { // is the upvalue equal to the global table? |
269 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "pushing destination global scope" << std::endl); | 269 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "pushing destination global scope" << std::endl); |
270 | lua_pushglobaltable(L2); // L2: ... {cache} ... function <upvalues> | 270 | luaG_pushglobaltable(L2); // L2: ... {cache} ... function <upvalues> |
271 | } else { | 271 | } else { |
272 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "copying value" << std::endl); | 272 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "copying value" << std::endl); |
273 | _c.L1_i = SourceIndex{ lua_gettop(L1) }; | 273 | _c.L1_i = SourceIndex{ lua_gettop(L1) }; |