From a52a7105c5e858961217560dae47e7490bc0f2d7 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 18 Jan 2018 05:09:51 +1100 Subject: src/lfunc.js: Use destructuring assignment for defs.js --- src/lfunc.js | 5 ++--- 1 file 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; } }; -- cgit v1.2.3-70-g09d2