From a02f4e93b92e7ebb7ef038ad151e51652b0ce84d Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 18 Apr 2017 15:20:37 +0200 Subject: No more Table, just TValue with table type and Map value --- src/lcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lcode.js') diff --git a/src/lcode.js b/src/lcode.js index ec233c6..2f95baa 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -483,7 +483,7 @@ const freeexps = function(fs, e1, e2) { */ const addk = function(fs, key, v) { let f = fs.f; - let idx = fs.ls.h.__index(fs.ls.h, key); /* index scanner table */ + let idx = lobject.table_index(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) @@ -491,7 +491,7 @@ const addk = function(fs, key, v) { } /* constant not found; create a new entry */ let k = fs.nk; - fs.ls.h.__newindex(fs.ls.h, key, new TValue(CT.LUA_TNUMINT, k)); + lobject.table_newindex(fs.ls.h, key, new TValue(CT.LUA_TNUMINT, k)); f.k[k] = v; fs.nk++; return k; -- cgit v1.2.3-54-g00ecf