From 1371afafae9144b30475262f06940c4057485d02 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 29 Dec 2017 02:31:22 +1100 Subject: src/: Pass js strings to auxlib functions such as luaL_argcheck --- tests/test-suite/ltests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') 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++) { -- cgit v1.2.3-70-g09d2