From d88e93b2465a1e5a8933725c8854a626f2a4214b Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 11 May 2017 14:35:41 +1000 Subject: src/lualib.js: Export luaopen symbols with correct name --- src/lualib.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lualib.js b/src/lualib.js index b3ba5f8..a509dc8 100644 --- a/src/lualib.js +++ b/src/lualib.js @@ -9,44 +9,44 @@ module.exports.LUA_VERSUFFIX = LUA_VERSUFFIX; const LUA_COLIBNAME = "coroutine"; module.exports.LUA_COLIBNAME = LUA_COLIBNAME; -module.exports[LUA_COLIBNAME] = require("./lcorolib.js").luaopen_coroutine; +module.exports.luaopen_coroutine = require("./lcorolib.js").luaopen_coroutine; const LUA_TABLIBNAME = "table"; module.exports.LUA_TABLIBNAME = LUA_TABLIBNAME; -module.exports[LUA_TABLIBNAME] = require("./ltablib.js").luaopen_table; +module.exports.luaopen_table = require("./ltablib.js").luaopen_table; if (!WEB) { const LUA_IOLIBNAME = "io"; module.exports.LUA_IOLIBNAME = LUA_IOLIBNAME; - module.exports[LUA_IOLIBNAME] = require("./liolib.js").luaopen_io; + module.exports.luaopen_io = require("./liolib.js").luaopen_io; } const LUA_OSLIBNAME = "os"; module.exports.LUA_OSLIBNAME = LUA_OSLIBNAME; -module.exports[LUA_OSLIBNAME] = require("./loslib.js").luaopen_os; +module.exports.luaopen_os = require("./loslib.js").luaopen_os; const LUA_STRLIBNAME = "string"; module.exports.LUA_STRLIBNAME = LUA_STRLIBNAME; -module.exports[LUA_STRLIBNAME] = require("./lstrlib.js").luaopen_string; +module.exports.luaopen_string = require("./lstrlib.js").luaopen_string; const LUA_UTF8LIBNAME = "utf8"; module.exports.LUA_UTF8LIBNAME = LUA_UTF8LIBNAME; -module.exports[LUA_UTF8LIBNAME] = require("./lutf8lib.js").luaopen_utf8; +module.exports.luaopen_utf8 = require("./lutf8lib.js").luaopen_utf8; const LUA_BITLIBNAME = "bit32"; module.exports.LUA_BITLIBNAME = LUA_BITLIBNAME; -// module.exports[LUA_BITLIBNAME] = require("./lbitlib.js").luaopen_bit32; +// module.exports.luaopen_bit32 = require("./lbitlib.js").luaopen_bit32; const LUA_MATHLIBNAME = "math"; module.exports.LUA_MATHLIBNAME = LUA_MATHLIBNAME; -module.exports[LUA_MATHLIBNAME] = require("./lmathlib.js").luaopen_math; +module.exports.luaopen_math = require("./lmathlib.js").luaopen_math; const LUA_DBLIBNAME = "debug"; module.exports.LUA_DBLIBNAME = LUA_DBLIBNAME; -module.exports[LUA_DBLIBNAME] = require("./ldblib.js").luaopen_debug; +module.exports.luaopen_debug = require("./ldblib.js").luaopen_debug; const LUA_LOADLIBNAME = "package"; module.exports.LUA_LOADLIBNAME = LUA_LOADLIBNAME; -module.exports[LUA_LOADLIBNAME] = require("./loadlib.js").luaopen_package; +module.exports.luaopen_package = require("./loadlib.js").luaopen_package; module.exports.luaL_openlibs = linit.luaL_openlibs; -- cgit v1.2.3-70-g09d2