diff options
| author | OpportunityLiu <[email protected]> | 2019-06-19 13:57:38 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-19 13:57:38 +0800 |
| commit | 522a4454a460e46ee98a41c9c4f9df1f92ae0ffe (patch) | |
| tree | 1144b8b53dcfb8c6b60f28ad5c07ef5cd29db7c3 | |
| parent | 0ea0f53bf8b4f52c05337e5966545baf28d8a582 (diff) | |
use a safe name
| -rw-r--r-- | core/src/xmake/sandbox/interactive.c | 6 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/xmake/sandbox/interactive.c b/core/src/xmake/sandbox/interactive.c index 941e38c31..6fc643520 100644 --- a/core/src/xmake/sandbox/interactive.c +++ b/core/src/xmake/sandbox/interactive.c @@ -332,12 +332,12 @@ tb_int_t xm_sandbox_interactive(lua_State* lua) /* dump results * * stack: arg1(sandbox_scope) [results] -> ... - * after: arg1(sandbox_scope) interactive_dump [results] -> ... + * after: arg1(sandbox_scope) $interactive_dump [results] -> ... */ - lua_getfield(lua, 1, "interactive_dump"); // load interactive_dump() 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("interactive_dump") " (%s)", lua_tostring(lua, -1))); + tb_printl(lua_pushfstring(lua, "error calling " LUA_QL("$interactive_dump") " (%s)", lua_tostring(lua, -1))); } } diff --git a/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua b/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua index 187cf7434..3f9ed4ccc 100644 --- a/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua +++ b/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua @@ -76,7 +76,7 @@ function sandbox_core_sandbox.interactive() end -- register dump function for interactive mode - instance._PUBLIC.interactive_dump = sandbox_core_sandbox._interactive_dump + instance._PUBLIC["$interactive_dump"] = sandbox_core_sandbox._interactive_dump -- enter interactive mode with this new sandbox sandbox.interactive(instance._PUBLIC) |
