From d5ad005f6c8a79af48f4c73f0ec87775ab746d0d Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 19 Jun 2019 11:30:06 +0800 Subject: improve dump --- core/src/xmake/sandbox/interactive.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/xmake') diff --git a/core/src/xmake/sandbox/interactive.c b/core/src/xmake/sandbox/interactive.c index 64c67af94..941e38c31 100644 --- a/core/src/xmake/sandbox/interactive.c +++ b/core/src/xmake/sandbox/interactive.c @@ -329,15 +329,15 @@ tb_int_t xm_sandbox_interactive(lua_State* lua) // get results count tb_int_t count = lua_gettop(lua) - top; - /* print errors + /* dump results * * stack: arg1(sandbox_scope) [results] -> ... - * after: arg1(sandbox_scope) print [results] -> ... + * after: arg1(sandbox_scope) interactive_dump [results] -> ... */ - lua_getfield(lua, 1, "print"); // load print() from sandbox_scope + lua_getfield(lua, 1, "interactive_dump"); // load interactive_dump() from sandbox_scope lua_insert(lua, -(count + 1)); if (lua_pcall(lua, count, 0, 0) != 0) - tb_printl(lua_pushfstring(lua, "error calling " LUA_QL("print") " (%s)", lua_tostring(lua, -1))); + tb_printl(lua_pushfstring(lua, "error calling " LUA_QL("interactive_dump") " (%s)", lua_tostring(lua, -1))); } } -- cgit v1.3.1