summaryrefslogtreecommitdiff
path: root/src/ltm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-19 18:12:07 +1000
committerdaurnimator <quae@daurnimator.com>2017-04-19 18:12:07 +1000
commit662381f6669f28f90a1d50c89647d265ca3804a4 (patch)
tree5ae3bce5dcf2a83302618280163d3088e5d090f8 /src/ltm.js
parent4d596650dff0417660874727964a32dae23dc9ea (diff)
parent6be8db07196c407cd321a7b04f5022939c4ffce3 (diff)
downloadfengari-662381f6669f28f90a1d50c89647d265ca3804a4.tar.gz
fengari-662381f6669f28f90a1d50c89647d265ca3804a4.tar.bz2
fengari-662381f6669f28f90a1d50c89647d265ca3804a4.zip
Merge branch 'master' into cli
Diffstat (limited to 'src/ltm.js')
-rw-r--r--src/ltm.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/ltm.js b/src/ltm.js
index 4a90f6d..57c2e3f 100644
--- a/src/ltm.js
+++ b/src/ltm.js
@@ -15,30 +15,30 @@ const CT = lua.constant_types;
const TMS = {
- TM_INDEX: lua.to_luastring("__index"),
- TM_NEWINDEX: lua.to_luastring("__newindex"),
- TM_GC: lua.to_luastring("__gc"),
- TM_MODE: lua.to_luastring("__mode"),
- TM_LEN: lua.to_luastring("__len"),
- TM_EQ: lua.to_luastring("__eq"), /* last tag method with fast access */
- TM_ADD: lua.to_luastring("__add"),
- TM_SUB: lua.to_luastring("__sub"),
- TM_MUL: lua.to_luastring("__mul"),
- TM_MOD: lua.to_luastring("__mod"),
- TM_POW: lua.to_luastring("__pow"),
- TM_DIV: lua.to_luastring("__div"),
- TM_IDIV: lua.to_luastring("__idiv"),
- TM_BAND: lua.to_luastring("__band"),
- TM_BOR: lua.to_luastring("__bor"),
- TM_BXOR: lua.to_luastring("__bxor"),
- TM_SHL: lua.to_luastring("__shl"),
- TM_SHR: lua.to_luastring("__shr"),
- TM_UNM: lua.to_luastring("__unm"),
- TM_BNOT: lua.to_luastring("__bnot"),
- TM_LT: lua.to_luastring("__lt"),
- TM_LE: lua.to_luastring("__le"),
- TM_CONCAT: lua.to_luastring("__concat"),
- TM_CALL: lua.to_luastring("__call")
+ TM_INDEX: lua.to_luastring("__index", true),
+ TM_NEWINDEX: lua.to_luastring("__newindex", true),
+ TM_GC: lua.to_luastring("__gc", true),
+ TM_MODE: lua.to_luastring("__mode", true),
+ TM_LEN: lua.to_luastring("__len", true),
+ TM_EQ: lua.to_luastring("__eq", true), /* last tag method with fast access */
+ TM_ADD: lua.to_luastring("__add", true),
+ TM_SUB: lua.to_luastring("__sub", true),
+ TM_MUL: lua.to_luastring("__mul", true),
+ TM_MOD: lua.to_luastring("__mod", true),
+ TM_POW: lua.to_luastring("__pow", true),
+ TM_DIV: lua.to_luastring("__div", true),
+ TM_IDIV: lua.to_luastring("__idiv", true),
+ TM_BAND: lua.to_luastring("__band", true),
+ TM_BOR: lua.to_luastring("__bor", true),
+ TM_BXOR: lua.to_luastring("__bxor", true),
+ TM_SHL: lua.to_luastring("__shl", true),
+ TM_SHR: lua.to_luastring("__shr", true),
+ TM_UNM: lua.to_luastring("__unm", true),
+ TM_BNOT: lua.to_luastring("__bnot", true),
+ TM_LT: lua.to_luastring("__lt", true),
+ TM_LE: lua.to_luastring("__le", true),
+ TM_CONCAT: lua.to_luastring("__concat", true),
+ TM_CALL: lua.to_luastring("__call", true)
};
const luaT_typenames_ = [
@@ -71,7 +71,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'));
+ let name = o.__index(o, lua.to_luastring('__name', true));
if (name.ttisstring())
return name.jsstring();
}
@@ -123,10 +123,10 @@ const luaT_trybinTM = function(L, p1, p2, res, event) {
if (n1 !== false && n2 !== false)
ldebug.luaG_tointerror(L, p1, p2);
else
- ldebug.luaG_opinterror(L, p1, p2, lua.to_luastring("perform bitwise operation on"));
+ ldebug.luaG_opinterror(L, p1, p2, lua.to_luastring("perform bitwise operation on", true));
}
default:
- ldebug.luaG_opinterror(L, p1, p2, lua.to_luastring("perform arithmetic on"));
+ ldebug.luaG_opinterror(L, p1, p2, lua.to_luastring("perform arithmetic on", true));
}
}
};