diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.236 2017/12/11 18:55:31 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.237 2017/12/15 18:53:48 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1377,7 +1377,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1377 | else if EQ("pop") { | 1377 | else if EQ("pop") { |
1378 | lua_pop(L1, getnum); | 1378 | lua_pop(L1, getnum); |
1379 | } | 1379 | } |
1380 | else if EQ("print") { | 1380 | else if EQ("printstack") { |
1381 | int n = getnum; | 1381 | int n = getnum; |
1382 | if (n != 0) { | 1382 | if (n != 0) { |
1383 | printf("%s\n", luaL_tolstring(L1, n, NULL)); | 1383 | printf("%s\n", luaL_tolstring(L1, n, NULL)); |
@@ -1385,6 +1385,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1385 | } | 1385 | } |
1386 | else printstack(L1); | 1386 | else printstack(L1); |
1387 | } | 1387 | } |
1388 | else if EQ("print") { | ||
1389 | const char *msg = getstring; | ||
1390 | printf("%s\n", msg); | ||
1391 | } | ||
1388 | else if EQ("pushbool") { | 1392 | else if EQ("pushbool") { |
1389 | lua_pushboolean(L1, getnum); | 1393 | lua_pushboolean(L1, getnum); |
1390 | } | 1394 | } |