diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
commit | a02f4e93b92e7ebb7ef038ad151e51652b0ce84d (patch) | |
tree | 2b83cacef266ff88ca3ed8cf3f19c1a1cbea7b38 /src/ltm.js | |
parent | 924ca09e8e9ec765301868d90dd3eba98058cafb (diff) | |
download | fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.gz fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.bz2 fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.zip |
No more Table, just TValue with table type and Map value
Diffstat (limited to 'src/ltm.js')
-rw-r--r-- | src/ltm.js | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -5,7 +5,6 @@ const assert = require('assert'); const lobject = require('./lobject.js'); const TValue = lobject.TValue; -const Table = lobject.Table; const ldo = require('./ldo.js'); const lstate = require('./lstate.js'); const lua = require('./lua.js'); @@ -71,7 +70,7 @@ const luaT_init = function(L) { */ const luaT_objtypename = function(L, o) { if ((o.ttistable() && o.metatable !== null) || (o.ttisfulluserdata() && o.metatable !== null)) { - let name = o.__index(o, lua.to_luastring('__name', true)); + let name = lobject.table_index(o, lua.to_luastring('__name', true)); if (name.ttisstring()) return name.jsstring(); } @@ -149,7 +148,7 @@ const luaT_gettmbyobj = function(L, o, event) { mt = L.l_G.mt[o.ttnov()]; } - return mt ? mt.__index(mt, event) : lobject.luaO_nilobject; + return mt ? lobject.table_index(mt, event) : lobject.luaO_nilobject; }; module.exports.TMS = TMS; |