From 71902632f1de46d70ee0280fc464d05013b98b28 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 12 Nov 2017 17:00:01 +1100 Subject: lua_writestringerror now takes a vararg and converts arrays --- src/lauxlib.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/lauxlib.js') diff --git a/src/lauxlib.js b/src/lauxlib.js index 3808c7e..24d2203 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -853,11 +853,18 @@ const luaL_dofile = function(L, filename) { return (luaL_loadfile(L, filename) || lua.lua_pcall(L, 0, lua.LUA_MULTRET, 0)); }; -const lua_writestringerror = function(s) { - if (WEB) { - process.stderr.write(s); - } else { - console.error(s); +const lua_writestringerror = function() { + for (let i=0; i