From 7af8347dbb7a8c3a09d2aebccd5f96384a7c55c3 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 24 Mar 2017 16:40:29 +0100 Subject: Proper use of luaO_nilobject --- src/lstate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lstate.js') 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; -- cgit v1.2.3-54-g00ecf