diff options
author | Benoit Giannangeli <giann@users.noreply.github.com> | 2017-05-22 20:06:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 20:06:57 +0200 |
commit | e3bdd1fea3665df28de25ed76f6399faf957179d (patch) | |
tree | 6884757b43064fa7163b54b86aa4561d185b5ca2 /src/lstate.js | |
parent | 25e2110a5eac0a2e6c7b4d502ffbd53fc61af301 (diff) | |
parent | 8a439e5563f12335e3d35dd63b4f8cbcc25a9bd8 (diff) | |
download | fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.gz fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.bz2 fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.zip |
Merge pull request #63 from daurnimator/fix-skipped-tests
Investigated + fixed some skipped tests
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 7 |
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; |