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, 2 insertions, 3 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 07a9f96..5ba568d 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -11,7 +11,6 @@ const LUA_MULTRET = lua.LUA_MULTRET;
const lobject = require('./lobject.js');
const TValue = lobject.TValue;
const Table = lobject.Table;
-const TString = lobject.TString;
const LClosure = lobject.LClosure;
const lfunc = require('./lfunc.js');
const UpVal = lfunc.UpVal;
@@ -879,7 +878,7 @@ const tostring = function(L, i) {
let str = `${o.value}`;
if (o.ttisstring() || (o.ttisnumber() && !isNaN(parseFloat(`${str}`)))) {
- L.stack[i] = new TString(str);
+ L.stack[i] = new TValue(CT.LUA_TLNGSTR, str);
return true;
}
@@ -914,7 +913,7 @@ const luaV_concat = function(L, total) {
tl += l;
}
- let ts = new TString("");
+ let ts = new TValue(CT.LUA_TLNGSTR, "");
for (let i = n; i > 0; i--) {
ts.value = `${ts.value}${L.stack[top - i].value}`;
}