From 266c0a526374274b1b07187e52aec6b40d0cab00 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 15:22:37 +1000 Subject: Move adhoc code into proper luaE_extendCI --- src/lstate.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index f4195cd..7f7bac9 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -74,6 +74,15 @@ class global_State { } +const luaE_extendCI = function(L) { + let ci = new CallInfo(); + L.ci.next = ci; + ci.previous = L.ci; + ci.next = null; + L.ci = ci; + L.ciOff++; + return ci; +}; const luaE_freeCI = function(L) { let ci = L.ci; @@ -196,5 +205,6 @@ module.exports.CIST_FIN = (1<<8); /* call is running a finalizer */ module.exports.lua_close = lua_close; module.exports.lua_newstate = lua_newstate; module.exports.lua_newthread = lua_newthread; +module.exports.luaE_extendCI = luaE_extendCI; module.exports.luaE_freeCI = luaE_freeCI; module.exports.luaE_freethread = luaE_freethread; -- cgit v1.2.3-54-g00ecf