diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-02-17 23:17:35 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-02-17 23:17:35 +0100 |
commit | de7046f938975dbdcd6cfaba6f535dec53dfc263 (patch) | |
tree | a68589e7ff126c8f62cf20773b6b531c5b833f59 /src/linit.js | |
parent | 06ec7904c37b897b2e87f4321198926ff22da1d9 (diff) | |
download | fengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.tar.gz fengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.tar.bz2 fengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.zip |
Load std lib, can call print
Diffstat (limited to 'src/linit.js')
-rw-r--r-- | src/linit.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/linit.js b/src/linit.js index 2747fc2..fc2a54d 100644 --- a/src/linit.js +++ b/src/linit.js @@ -8,15 +8,15 @@ const lauxlib = require('./lauxlib.js'); const lbaselib = require('./lbaselib.js'); const loadedlibs = { - "_G" = luaopen_base + "_G": lbaselib.luaopen_base }; const luaL_openlibs = function(L) { /* "require" functions from 'loadedlibs' and set results to global table */ - for (lib in loadedlibs) { + for (let lib in loadedlibs) { lauxlib.luaL_requiref(L, lib, loadedlibs[lib], 1); lapi.lua_pop(L, 1); /* remove lib */ } -} +}; module.exports.luaL_openlibs = luaL_openlibs;
\ No newline at end of file |