From 97bb7386d33d21b784e21fd4067e77c6c3084d71 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 8 May 2017 14:27:25 +1000 Subject: LexState.h is a Table not a TValue --- src/lcode.js | 2 +- src/lparser.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lcode.js b/src/lcode.js index 4d3c547..b697b16 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -484,7 +484,7 @@ const freeexps = function(fs, e1, e2) { */ const addk = function(fs, key, v) { let f = fs.f; - let idx = ltable.luaH_set(fs.ls.h.value, key); /* index scanner table */ + let idx = ltable.luaH_set(fs.ls.h, key); /* index scanner table */ if (idx && !idx.ttisnil()) { /* is there an index there? */ /* correct value? (warning: must distinguish floats from integers!) */ if (idx.value < fs.nk && f.k[idx.value].ttype() === v.ttype() && f.k[idx.value].value === v.value) diff --git a/src/lparser.js b/src/lparser.js index c90ff01..740fab1 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -1557,7 +1557,7 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) { let funcstate = new FuncState(); let cl = lfunc.luaF_newLclosure(L, 1); /* create main closure */ L.stack[L.top++] = new TValue(defs.CT.LUA_TLCL, cl); - lexstate.h = new TValue(defs.CT.LUA_TTABLE, ltable.luaH_new(L)); /* create table for scanner */ + lexstate.h = ltable.luaH_new(L); /* create table for scanner */ L.stack[L.top++] = lexstate.h; funcstate.f = cl.p = new Proto(L); funcstate.f.source = lstring.luaS_new(L, name); -- cgit v1.2.3-70-g09d2