diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-29 02:31:22 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-29 02:44:44 +1100 |
commit | 1371afafae9144b30475262f06940c4057485d02 (patch) | |
tree | 1df4d0ffcd1f3dadb8942646533b779df8e8a4a4 /tests/test-suite | |
parent | c93673f0af0ebdc5165cf0acc340f65b6c6fa786 (diff) | |
download | fengari-1371afafae9144b30475262f06940c4057485d02.tar.gz fengari-1371afafae9144b30475262f06940c4057485d02.tar.bz2 fengari-1371afafae9144b30475262f06940c4057485d02.zip |
src/: Pass js strings to auxlib functions such as luaL_argcheck
Diffstat (limited to 'tests/test-suite')
-rw-r--r-- | tests/test-suite/ltests.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js index 08bb603..fa6d697 100644 --- a/tests/test-suite/ltests.js +++ b/tests/test-suite/ltests.js @@ -552,7 +552,7 @@ const newstate = function(L) { const getstate = function(L) { let L1 = lua.lua_touserdata(L, 1); - lauxlib.luaL_argcheck(L, L1 !== null, 1, lua.to_luastring("state expected", true)); + lauxlib.luaL_argcheck(L, L1 !== null, 1, "state expected"); return L1; }; @@ -751,7 +751,7 @@ const makeCfunc = function(L) { const coresume = function(L) { let status; let co = lua.lua_tothread(L, 1); - lauxlib.luaL_argcheck(L, co, 1, lua.to_luastring("coroutine expected", true)); + lauxlib.luaL_argcheck(L, co, 1, "coroutine expected"); status = lua.lua_resume(co, L, 0); if (status != lua.LUA_OK && status !== lua.LUA_YIELD) { lua.lua_pushboolean(L, 0); @@ -805,7 +805,7 @@ const buildop = function(p, pc) { const listcode = function(L) { lauxlib.luaL_argcheck(L, lua.lua_isfunction(L, 1) && !lua.lua_iscfunction(L, 1), - 1, lua.to_luastring("Lua function expected", true)); + 1, "Lua function expected"); let p = obj_at(L, 1); lua.lua_newtable(L); setnameval(L, lua.to_luastring("maxstack", true), p.maxstacksize); @@ -821,7 +821,7 @@ const listcode = function(L) { const listk = function(L) { lauxlib.luaL_argcheck(L, lua.lua_isfunction(L, 1) && !lua.lua_iscfunction(L, 1), - 1, lua.to_luastring("Lua function expected"), true); + 1, "Lua function expected"); let p = obj_at(L, 1); lua.lua_createtable(L, p.k.length, 0); for (let i = 0; i < p.k.length; i++) { |