From b3c87776e08f546a9994527f7c2c7fc4ec07d9a1 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 17:09:03 +1000 Subject: Introduce setobjs2s --- src/lobject.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lobject.js') diff --git a/src/lobject.js b/src/lobject.js index b6fd581..7b8a332 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -185,6 +185,11 @@ class TValue { } +/* from stack to (same) stack */ +const setobjs2s = function(L, newidx, oldidx) { + L.stack[newidx] = L.stack[oldidx]; +}; + const luaO_nilobject = new TValue(CT.LUA_TNIL, null); Object.freeze(luaO_nilobject); module.exports.luaO_nilobject = luaO_nilobject; @@ -667,3 +672,4 @@ module.exports.luaO_tostring = luaO_tostring; module.exports.luaO_utf8desc = luaO_utf8desc; module.exports.luaO_utf8esc = luaO_utf8esc; module.exports.numarith = numarith; +module.exports.setobjs2s = setobjs2s; -- cgit v1.2.3-54-g00ecf