diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 16:40:29 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 16:40:29 +0100 |
commit | 7af8347dbb7a8c3a09d2aebccd5f96384a7c55c3 (patch) | |
tree | 174de728b42de05b68f8ad10d1b0efddf6c188e0 /src/lstate.js | |
parent | 12944ea4d52a330b8b015af296dbbdee3fb4abbd (diff) | |
download | fengari-7af8347dbb7a8c3a09d2aebccd5f96384a7c55c3.tar.gz fengari-7af8347dbb7a8c3a09d2aebccd5f96384a7c55c3.tar.bz2 fengari-7af8347dbb7a8c3a09d2aebccd5f96384a7c55c3.zip |
Proper use of luaO_nilobject
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lstate.js b/src/lstate.js index 80dcc21..74c908d 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -68,7 +68,7 @@ class global_State { constructor(L) { this.mainthread = L; this.strt = new Map(); - this.l_registry = ldo.nil; + this.l_registry = new lobject.TValue(CT.LUA_TNIL, null); this.panic = null; this.version = null; this.twups = []; @@ -98,7 +98,7 @@ const stack_init = function(L1, L) { ci.callstatus = 0; ci.func = L1.stack[L1.top]; ci.funcOff = L1.top; - L1.stack[L1.top++] = ldo.nil; + L1.stack[L1.top++] = new lobject.TValue(CT.LUA_TNIL, null); ci.top = L1.top + lua.LUA_MINSTACK; L1.ci = ci; }; @@ -183,4 +183,4 @@ module.exports.CIST_HOOKYIELD = (1<<6); /* last hook called yielded */ module.exports.CIST_LEQ = (1<<7); /* using __lt for __le */ module.exports.CIST_FIN = (1<<8); /* call is running a finalizer */ module.exports.lua_newstate = lua_newstate; -module.exports.lua_newthread = lua_newthread;
\ No newline at end of file +module.exports.lua_newthread = lua_newthread; |