diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-18 13:25:33 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-18 13:26:16 +1000 |
commit | 589df5f4e66bf954ded619c6f7bb713ae82514d6 (patch) | |
tree | 4fdb4787b96b71861fb760efbc2099055f0b0cb5 | |
parent | 7191624414a0c2646b0ee319260b91c383027ead (diff) | |
download | fengari-589df5f4e66bf954ded619c6f7bb713ae82514d6.tar.gz fengari-589df5f4e66bf954ded619c6f7bb713ae82514d6.tar.bz2 fengari-589df5f4e66bf954ded619c6f7bb713ae82514d6.zip |
src/ltm.js: luaH_getstr takes a TString, not a raw string
-rw-r--r-- | src/ltm.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -95,11 +95,12 @@ const luaT_init = function(L) { ** Return the name of the type of an object. For tables and userdata ** with metatable, use their '__name' metafield, if present. */ +const __name = defs.to_luastring('__name', true); const luaT_objtypename = function(L, o) { let mt; if ((o.ttistable() && (mt = o.value.metatable) !== null) || (o.ttisfulluserdata() && (mt = o.value.metatable) !== null)) { - let name = ltable.luaH_getstr(mt, defs.to_luastring('__name', true)); + let name = ltable.luaH_getstr(mt, lstring.luaS_bless(L, __name)); if (name.ttisstring()) return name.svalue(); } |