summaryrefslogtreecommitdiff
path: root/src/linit.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-17 23:17:35 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-17 23:17:35 +0100
commitde7046f938975dbdcd6cfaba6f535dec53dfc263 (patch)
treea68589e7ff126c8f62cf20773b6b531c5b833f59 /src/linit.js
parent06ec7904c37b897b2e87f4321198926ff22da1d9 (diff)
downloadfengari-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.js6
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