summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-29 11:57:43 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-03-29 14:37:07 +0200
commit2e5b595a2e04fe72555a565af4aae43560946473 (patch)
tree750e770114181283acb0fd78f7ad241c17c3d9a7 /src/ldo.js
parent36f3247d47c1ad854fa89aabf17f6d954a6a6657 (diff)
downloadfengari-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.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ldo.js b/src/ldo.js
index 50d455e..54d1ac0 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -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);
}
};