From b54eee30383e4eaae74551afc9d1c59126269305 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 16:46:56 +1000 Subject: An open upvalue already knows which lua_State it comes from --- src/lfunc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lfunc.js') diff --git a/src/lfunc.js b/src/lfunc.js index db623b5..0b78bd3 100644 --- a/src/lfunc.js +++ b/src/lfunc.js @@ -41,8 +41,8 @@ class UpVal { }; } - val(L) { - return this.v !== null ? L.stack[this.v] : this.u.value; + val() { + return this.v !== null ? this.L.stack[this.v] : this.u.value; } setval(L, ra) { @@ -94,7 +94,7 @@ const luaF_close = function(L, level) { assert(uv.isopen()); L.openupval = uv.u.open.next; /* remove from 'open' list */ if (uv.refcount > 0) { - let from = L.stack[uv.v]; + let from = uv.L.stack[uv.v]; uv.u.value = new lobject.TValue(from.type, from.value); uv.v = null; } -- cgit v1.2.3-54-g00ecf