summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-22 23:54:15 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-23 00:53:02 +1000
commitee502076941676ff570866cba36a21bf06c29fc0 (patch)
treed542a3e360db4e33e668387cbde5c16b224dbc3a /src/lstate.js
parent69fdbe3590eb2ddfa970888b7b59e8a84fbda101 (diff)
downloadfengari-ee502076941676ff570866cba36a21bf06c29fc0.tar.gz
fengari-ee502076941676ff570866cba36a21bf06c29fc0.tar.bz2
fengari-ee502076941676ff570866cba36a21bf06c29fc0.zip
Revert "src/lstate.js: Remove useless luaE_freeCI"
This reverts commit 6646bebd474b95a2d4cbb8558c0d1cb5b5353de0.
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lstate.js b/src/lstate.js
index b71e011..124322d 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -86,6 +86,11 @@ const luaE_extendCI = function(L) {
return ci;
};
+const luaE_freeCI = function(L) {
+ let ci = L.ci;
+ ci.next = null;
+};
+
const stack_init = function(L1, L) {
L1.stack = new Array(BASIC_STACK_SIZE);
L1.top = 0;
@@ -103,6 +108,7 @@ const stack_init = function(L1, L) {
const freestack = function(L) {
L.ci = L.base_ci;
+ luaE_freeCI(L);
L.stack = null;
};
@@ -204,4 +210,5 @@ 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;