summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index ef5d370..8bfef40 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -9,6 +9,7 @@ const luaconf = require('./luaconf.js');
const lobject = require('./lobject.js');
const lfunc = require('./lfunc.js');
const lstate = require('./lstate.js');
+const lstring = require('./lstring.js');
const llimit = require('./llimit.js');
const ldo = require('./ldo.js');
const ltm = require('./ltm.js');
@@ -991,7 +992,7 @@ const tostring = function(L, i) {
if (o.ttisstring()) return true;
if (o.ttisnumber() && !isNaN(o.value)) {
- L.stack[i] = L.l_G.intern(defs.to_luastring(`${o.value}`));
+ L.stack[i] = new lobject.TValue(CT.LUA_TLNGSTR, lstring.luaS_bless(L, defs.to_luastring(`${o.value}`)));
return true;
}
@@ -1029,7 +1030,7 @@ const luaV_concat = function(L, total) {
ts = ts.concat(L.stack[top - i].value);
}
- L.stack[top - n] = L.l_G.intern(ts);
+ L.stack[top - n] = new lobject.TValue(CT.LUA_TLNGSTR, lstring.luaS_bless(L, ts));
}
total -= n - 1; /* got 'n' strings to create 1 new */
L.top -= n - 1; /* popped 'n' strings and pushed one */