summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-18 07:17:59 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-18 07:17:59 +1100
commited7ac85c409ffec65aa86189f49e5d46e7a110bc (patch)
tree9a02ed29652757dcf0ebc81b7db2c7da82474ca5 /src/lobject.js
parent8bedd949c894d61284b3ddd5b3bf989b651b95f8 (diff)
downloadfengari-ed7ac85c409ffec65aa86189f49e5d46e7a110bc.tar.gz
fengari-ed7ac85c409ffec65aa86189f49e5d46e7a110bc.tar.bz2
fengari-ed7ac85c409ffec65aa86189f49e5d46e7a110bc.zip
src/: Destructure when requiring lstring.js
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 133084a..297401c 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -46,7 +46,10 @@ const ldebug = require('./ldebug.js');
const ldo = require('./ldo.js');
const lfunc = require('./lfunc.js');
const lstate = require('./lstate.js');
-const lstring = require('./lstring.js');
+const {
+ luaS_bless,
+ luaS_new
+} = require('./lstring.js');
const ltable = require('./ltable.js');
const luaconf = require('./luaconf.js');
const lvm = require('./lvm.js');
@@ -576,12 +579,12 @@ const luaO_tostring = function(L, obj) {
}
buff = to_luastring(str);
}
- obj.setsvalue(lstring.luaS_bless(L, buff));
+ obj.setsvalue(luaS_bless(L, buff));
};
const pushstr = function(L, str) {
ldo.luaD_inctop(L);
- setsvalue2s(L, L.top-1, lstring.luaS_new(L, str));
+ setsvalue2s(L, L.top-1, luaS_new(L, str));
};
const luaO_pushvfstring = function(L, fmt, argp) {