summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js6
1 files changed, 6 insertions, 0 deletions
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;