diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-22 15:15:10 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-22 15:15:10 +1100 |
commit | d28bfe3d7e489f036ac3b336ecfd7b5d1bf7b0c9 (patch) | |
tree | 8f05233d97ceaf2d95e01e1b14fe5e5c24eda4da /src | |
parent | c18debce7c7ea94e0155a5d628f21375ebfb7218 (diff) | |
download | fengari-d28bfe3d7e489f036ac3b336ecfd7b5d1bf7b0c9.tar.gz fengari-d28bfe3d7e489f036ac3b336ecfd7b5d1bf7b0c9.tar.bz2 fengari-d28bfe3d7e489f036ac3b336ecfd7b5d1bf7b0c9.zip |
src/linit.js: Use destructuring requires
Diffstat (limited to 'src')
-rw-r--r-- | src/linit.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/linit.js b/src/linit.js index 5656bae..f717767 100644 --- a/src/linit.js +++ b/src/linit.js @@ -1,8 +1,9 @@ "use strict"; -const lua = require('./lua.js'); -const lauxlib = require('./lauxlib.js'); -const {to_luastring} = require("./fengaricore.js"); +const { lua_pop } = require('./lua.js'); +const { luaL_requiref } = require('./lauxlib.js'); +const lualib = require('./lualib.js'); +const { to_luastring } = require("./fengaricore.js"); const lbaselib = require('./lbaselib.js'); const lcorolib = require('./lcorolib.js'); @@ -13,7 +14,6 @@ const lutf8lib = require('./lutf8lib.js'); const ldblib = require('./ldblib.js'); const loslib = require('./loslib.js'); const loadlib = require('./loadlib.js'); -const lualib = require('./lualib.js'); const luaL_openlibs = function(L) { const loadedlibs = { @@ -32,8 +32,8 @@ const luaL_openlibs = function(L) { /* "require" functions from 'loadedlibs' and set results to global table */ for (let lib in loadedlibs) { - lauxlib.luaL_requiref(L, to_luastring(lib), loadedlibs[lib], 1); - lua.lua_pop(L, 1); /* remove lib */ + luaL_requiref(L, to_luastring(lib), loadedlibs[lib], 1); + lua_pop(L, 1); /* remove lib */ } }; |