summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-18 05:09:51 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-18 07:07:53 +1100
commita52a7105c5e858961217560dae47e7490bc0f2d7 (patch)
tree1cc4989b4731c44bb3bbc3086cfa480d6d9d4f0b /src/lfunc.js
parent84fb9dd5ec1dbd1df76eb4cc1fcecb19293e6b6f (diff)
downloadfengari-a52a7105c5e858961217560dae47e7490bc0f2d7.tar.gz
fengari-a52a7105c5e858961217560dae47e7490bc0f2d7.tar.bz2
fengari-a52a7105c5e858961217560dae47e7490bc0f2d7.zip
src/lfunc.js: Use destructuring assignment for defs.js
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index c278c48..2f28d0e 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -1,9 +1,8 @@
"use strict";
-const defs = require('./defs.js');
+const { constant_types: { LUA_TNIL } } = require('./defs.js');
const { lua_assert } = require('./llimits.js');
const lobject = require('./lobject.js');
-const CT = defs.constant_types;
class Proto {
@@ -95,7 +94,7 @@ const luaF_initupvals = function(L, cl) {
for (let i = 0; i < cl.nupvalues; i++) {
let uv = new UpVal(L);
uv.refcount = 1;
- uv.v = new lobject.TValue(CT.LUA_TNIL, null);
+ uv.v = new lobject.TValue(LUA_TNIL, null);
cl.upvals[i] = uv;
}
};