diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-29 11:57:43 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-29 14:37:07 +0200 |
commit | 2e5b595a2e04fe72555a565af4aae43560946473 (patch) | |
tree | 750e770114181283acb0fd78f7ad241c17c3d9a7 /src/ldo.js | |
parent | 36f3247d47c1ad854fa89aabf17f6d954a6a6657 (diff) | |
download | fengari-2e5b595a2e04fe72555a565af4aae43560946473.tar.gz fengari-2e5b595a2e04fe72555a565af4aae43560946473.tar.bz2 fengari-2e5b595a2e04fe72555a565af4aae43560946473.zip |
Never use js strings internally
Diffstat (limited to 'src/ldo.js')
-rw-r--r-- | src/ldo.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -448,9 +448,9 @@ const lua_yieldk = function(L, nresults, ctx, k) { if (L.nny > 0) { if (L !== L.l_G.mainthread) - ldebug.luaG_runerror(L, "attempt to yield across a JS-call boundary"); + ldebug.luaG_runerror(L, lua.to_luastring("attempt to yield across a JS-call boundary")); else - ldebug.luaG_runerror(L, "attempt to yield from outside a coroutine"); + ldebug.luaG_runerror(L, lua.to_luastring("attempt to yield from outside a coroutine")); } L.status = TS.LUA_YIELD; @@ -519,8 +519,8 @@ class SParser { } const checkmode = function(L, mode, x) { - if (mode && mode.indexOf(x.charAt(0)) === -1) { - lapi.lua_pushstring(L, `attempt to load a ${x} chunk (mode is '${mode}')`); + if (mode && mode.indexOf(x.charCodeAt(0)) === -1) { + lapi.lua_pushstring(L, lua.to_luastring(`attempt to load a ${lobject.jsstring(x)} chunk (mode is '${mode}')`)); luaD_throw(L, TS.LUA_ERRSYNTAX); } }; |