From 193bf7919ea97a2d1a98734e1a215ee6d3fc021b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Jul 2024 14:57:11 -0300 Subject: 'printstack' (from ltests.c) made public That function is useful for debugging the API. --- ltests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index cd728947..ad40801e 100644 --- a/ltests.c +++ b/ltests.c @@ -822,7 +822,7 @@ static int listlocals (lua_State *L) { -static void printstack (lua_State *L) { +void lua_printstack (lua_State *L) { int i; int n = lua_gettop(L); printf("stack: >>\n"); @@ -1652,7 +1652,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { printf("%s\n", luaL_tolstring(L1, n, NULL)); lua_pop(L1, 1); } - else printstack(L1); + else lua_printstack(L1); } else if EQ("print") { const char *msg = getstring; -- cgit v1.2.3-55-g6feb