summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-12 10:50:19 +0100
committerBenoit Giannangeli <giann@users.noreply.github.com>2017-03-13 11:03:24 +0100
commit632cf08572b35e8a350ac8b1f9d5bf77fb4e7b95 (patch)
treef44c8921491b40561b7709cd0c081c931ba18f6a /src/ldo.js
parent883d01f0a707a03ef5b183cd2d03046fdc544e0e (diff)
downloadfengari-632cf08572b35e8a350ac8b1f9d5bf77fb4e7b95.tar.gz
fengari-632cf08572b35e8a350ac8b1f9d5bf77fb4e7b95.tar.bz2
fengari-632cf08572b35e8a350ac8b1f9d5bf77fb4e7b95.zip
[Strings] ldebug.js, ldo.js, lfunc.js
Diffstat (limited to 'src/ldo.js')
-rw-r--r--src/ldo.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ldo.js b/src/ldo.js
index cde2755..e088d8d 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -25,11 +25,11 @@ const nil = new TValue(CT.LUA_TNIL, null);
const seterrorobj = function(L, errcode, oldtop) {
switch (errcode) {
case TS.LUA_ERRMEM: {
- L.stack[oldtop] = new TValue(CT.LUA_TLNGSTR, "not enough memory");
+ L.stack[oldtop] = L.l_G.intern(lua.to_luastring("not enough memory"));
break;
}
case TS.LUA_ERRERR: {
- L.stack[oldtop] = new TValue(CT.LUA_TLNGSTR, "error in error handling");
+ L.stack[oldtop] = L.l_G.intern(lua.to_luastring("error in error handling"));
break;
}
default: {
@@ -359,7 +359,7 @@ const recover = function(L, status) {
*/
const resume_error = function(L, msg, narg) {
L.top -= narg; /* remove args from the stack */
- L.stack[L.top++] = new TValue(CT.LUA_TLNGSTR, msg); /* push error message */
+ L.stack[L.top++] = L.l_G.intern(lua.to_luastring(msg)); /* push error message */
assert(L.top <= L.ci.top, "stack overflow");
return TS.LUA_ERRRUN;
};