diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-29 14:39:57 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-30 09:57:53 +0200 |
commit | 456ab7b69f88859683c60cc2261e70d6dbadd8e8 (patch) | |
tree | 12baf4ae489e7afd4819ec94bc413c1c2a1db05d /src/linit.js | |
parent | 2e5b595a2e04fe72555a565af4aae43560946473 (diff) | |
download | fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.gz fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.bz2 fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.zip |
8-bit string internally tests
Lexing/Parsing is done on byte rather than js strings
Diffstat (limited to 'src/linit.js')
-rw-r--r-- | src/linit.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linit.js b/src/linit.js index 4d50f8b..3e9b1af 100644 --- a/src/linit.js +++ b/src/linit.js @@ -2,6 +2,7 @@ const assert = require('assert'); +const lua = require('./lua.js'); const lapi = require('./lapi.js'); const lauxlib = require('./lauxlib.js'); const lbaselib = require('./lbaselib.js'); @@ -24,9 +25,9 @@ const loadedlibs = { const luaL_openlibs = function(L) { /* "require" functions from 'loadedlibs' and set results to global table */ for (let lib in loadedlibs) { - lauxlib.luaL_requiref(L, lib, loadedlibs[lib], 1); + lauxlib.luaL_requiref(L, lua.to_luastring(lib), loadedlibs[lib], 1); lapi.lua_pop(L, 1); /* remove lib */ } }; -module.exports.luaL_openlibs = luaL_openlibs;
\ No newline at end of file +module.exports.luaL_openlibs = luaL_openlibs; |