This commit is contained in:
2020-11-15 16:49:42 -05:00
parent a784f12aed
commit f690fb147b
12 changed files with 431 additions and 168 deletions

View File

@@ -12,7 +12,7 @@
#include <signal.h>
#include <vector>
#include <string>
#include "lua-headers.hpp"
#include "lpx-stack-manager.hpp"
#include "util.hpp"
#include "lpx-table.hpp"
#include "lpx-classdb.hpp"
@@ -174,7 +174,11 @@ static void dotty(lua_State *L)
report(L, status);
if (status == LUA_OK && lua_gettop(L) > 0)
{ /* any result to print? */
lua_getglobal(L, "print");
lua_getglobal(L, "iprint");
if (lua_isnil(L, -1)) {
lua_pop(L, 1);
lua_getglobal(L, "print");
}
lua_insert(L, 1);
if (lua_pcall(L, lua_gettop(L) - 1, 0, 0) != 0)
{