diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-18 05:09:51 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-18 07:07:53 +1100 |
commit | a52a7105c5e858961217560dae47e7490bc0f2d7 (patch) | |
tree | 1cc4989b4731c44bb3bbc3086cfa480d6d9d4f0b /src | |
parent | 84fb9dd5ec1dbd1df76eb4cc1fcecb19293e6b6f (diff) | |
download | fengari-a52a7105c5e858961217560dae47e7490bc0f2d7.tar.gz fengari-a52a7105c5e858961217560dae47e7490bc0f2d7.tar.bz2 fengari-a52a7105c5e858961217560dae47e7490bc0f2d7.zip |
src/lfunc.js: Use destructuring assignment for defs.js
Diffstat (limited to 'src')
-rw-r--r-- | src/lfunc.js | 5 |
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; } }; |