summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-07 02:05:22 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-07 02:05:22 +1100
commita80d704ceb4e7d85dc54a9c3706d6ffa7bf2412f (patch)
treec180a496428237fbbe60d4ff0079c1adeec376c9 /src
parent90649345e011cdb998efe216f5e94a38d81eb4d2 (diff)
downloadfengari-a80d704ceb4e7d85dc54a9c3706d6ffa7bf2412f.tar.gz
fengari-a80d704ceb4e7d85dc54a9c3706d6ffa7bf2412f.tar.bz2
fengari-a80d704ceb4e7d85dc54a9c3706d6ffa7bf2412f.zip
src/lauxlib.js: Export luastring_eq
Diffstat (limited to 'src')
-rw-r--r--src/lauxlib.js2
-rw-r--r--src/lua.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index e94b886..b2ee971 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -154,7 +154,7 @@ const luaL_argerror = function(L, arg, extramsg) {
lua.lua_getinfo(L, lua.to_luastring("n"), ar);
- if (ar.namewhat.toString() === lua.to_luastring("method").toString()) { /* TODO: luastring_eq? */
+ if (lua.luastring_eq(ar.namewhat, lua.to_luastring("method"))) {
arg--; /* do not count 'self' */
if (arg === 0) /* error is in the self argument itself? */
return luaL_error(L, lua.to_luastring("calling '%s' on bad self (%s)"), ar.name, extramsg);
diff --git a/src/lua.js b/src/lua.js
index a102431..ccdafd1 100644
--- a/src/lua.js
+++ b/src/lua.js
@@ -78,6 +78,7 @@ module.exports.LUA_VERSUFFIX = defs.LUA_VERSUFFIX;
module.exports.LUA_YIELD = defs.thread_status.LUA_YIELD;
module.exports.lua_Debug = defs.lua_Debug;
module.exports.lua_upvalueindex = defs.lua_upvalueindex;
+module.exports.luastring_eq = defs.luastring_eq;
module.exports.luastring_of = defs.luastring_of;
module.exports.to_jsstring = defs.to_jsstring;
module.exports.to_luastring = defs.to_luastring;