summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js82
1 files changed, 44 insertions, 38 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 5a13379..03ca210 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -545,41 +545,47 @@ if (typeof require === "function") {
}
}
-module.exports.LUA_LOADED_TABLE = LUA_LOADED_TABLE;
-module.exports.luaL_Buffer = luaL_Buffer;
-module.exports.luaL_addchar = luaL_addchar;
-module.exports.luaL_addlstring = luaL_addlstring;
-module.exports.luaL_addstring = luaL_addstring;
-module.exports.luaL_addvalue = luaL_addvalue;
-module.exports.luaL_argcheck = luaL_argcheck;
-module.exports.luaL_argerror = luaL_argerror;
-module.exports.luaL_buffinit = luaL_buffinit;
-module.exports.luaL_buffinitsize = luaL_buffinitsize;
-module.exports.luaL_callmeta = luaL_callmeta;
-module.exports.luaL_checkany = luaL_checkany;
-module.exports.luaL_checkinteger = luaL_checkinteger;
-module.exports.luaL_checklstring = luaL_checklstring;
-module.exports.luaL_checknumber = luaL_checknumber;
-module.exports.luaL_checkstack = luaL_checkstack;
-module.exports.luaL_checkstring = luaL_checkstring;
-module.exports.luaL_checktype = luaL_checktype;
-module.exports.luaL_error = luaL_error;
-module.exports.luaL_getmetafield = luaL_getmetafield;
-module.exports.luaL_getsubtable = luaL_getsubtable;
-module.exports.luaL_len = luaL_len;
-module.exports.luaL_loadbuffer = luaL_loadbuffer;
-module.exports.luaL_loadbufferx = luaL_loadbufferx;
-module.exports.luaL_loadstring = luaL_loadstring;
-module.exports.luaL_newlib = luaL_newlib;
-module.exports.luaL_newstate = luaL_newstate;
-module.exports.luaL_opt = luaL_opt;
-module.exports.luaL_optinteger = luaL_optinteger;
-module.exports.luaL_optlstring = luaL_optlstring;
-module.exports.luaL_optstring = luaL_optstring;
-module.exports.luaL_prepbuffsize = luaL_prepbuffsize;
-module.exports.luaL_pushresult = luaL_pushresult;
-module.exports.luaL_requiref = luaL_requiref;
-module.exports.luaL_setfuncs = luaL_setfuncs;
-module.exports.luaL_tolstring = luaL_tolstring;
-module.exports.luaL_typename = luaL_typename;
-module.exports.luaL_where = luaL_where;
+const lua_writestringerror = function(s) {
+ if (process.stderr) process.stderr.write(s);
+ else console.error(s);
+};
+
+module.exports.LUA_LOADED_TABLE = LUA_LOADED_TABLE;
+module.exports.luaL_Buffer = luaL_Buffer;
+module.exports.luaL_addchar = luaL_addchar;
+module.exports.luaL_addlstring = luaL_addlstring;
+module.exports.luaL_addstring = luaL_addstring;
+module.exports.luaL_addvalue = luaL_addvalue;
+module.exports.luaL_argcheck = luaL_argcheck;
+module.exports.luaL_argerror = luaL_argerror;
+module.exports.luaL_buffinit = luaL_buffinit;
+module.exports.luaL_buffinitsize = luaL_buffinitsize;
+module.exports.luaL_callmeta = luaL_callmeta;
+module.exports.luaL_checkany = luaL_checkany;
+module.exports.luaL_checkinteger = luaL_checkinteger;
+module.exports.luaL_checklstring = luaL_checklstring;
+module.exports.luaL_checknumber = luaL_checknumber;
+module.exports.luaL_checkstack = luaL_checkstack;
+module.exports.luaL_checkstring = luaL_checkstring;
+module.exports.luaL_checktype = luaL_checktype;
+module.exports.luaL_error = luaL_error;
+module.exports.luaL_getmetafield = luaL_getmetafield;
+module.exports.luaL_getsubtable = luaL_getsubtable;
+module.exports.luaL_len = luaL_len;
+module.exports.luaL_loadbuffer = luaL_loadbuffer;
+module.exports.luaL_loadbufferx = luaL_loadbufferx;
+module.exports.luaL_loadstring = luaL_loadstring;
+module.exports.luaL_newlib = luaL_newlib;
+module.exports.luaL_newstate = luaL_newstate;
+module.exports.luaL_opt = luaL_opt;
+module.exports.luaL_optinteger = luaL_optinteger;
+module.exports.luaL_optlstring = luaL_optlstring;
+module.exports.luaL_optstring = luaL_optstring;
+module.exports.luaL_prepbuffsize = luaL_prepbuffsize;
+module.exports.luaL_pushresult = luaL_pushresult;
+module.exports.luaL_requiref = luaL_requiref;
+module.exports.luaL_setfuncs = luaL_setfuncs;
+module.exports.luaL_tolstring = luaL_tolstring;
+module.exports.luaL_typename = luaL_typename;
+module.exports.luaL_where = luaL_where;
+module.exports.lua_writestringerror = lua_writestringerror;