From 698a10a3aaa3b5df0c22597e9b92a89b4f921632 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 8 May 2017 17:27:02 +1000 Subject: ltm.TMS should be indexes into an array --- src/lstate.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index f2e17cd..664ef27 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -9,7 +9,7 @@ const ldo = require('./ldo.js'); const lapi = require('./lapi.js'); const ltable = require('./ltable.js'); const lfunc = require('./lfunc.js'); -const luaT_init = require('./ltm.js').luaT_init; +const ltm = require('./ltm.js'); const CT = defs.constant_types; const TS = defs.thread_status; const LUA_NUMTAGS = defs.LUA_NUMTAGS; @@ -68,6 +68,7 @@ class global_State { this.l_registry = new lobject.TValue(CT.LUA_TNIL, null); this.panic = null; this.version = null; + this.tmname = new Array(ltm.TMS.TM_N); this.mt = new Array(LUA_NUMTAGS); } @@ -105,7 +106,7 @@ const f_luaopen = function(L) { let g = L.l_G; stack_init(L, L); init_registry(L, g); - luaT_init(L); + ltm.luaT_init(L); g.version = lapi.lua_version(null); }; -- cgit v1.2.3-54-g00ecf