From f0b3cd1d6f35ba34091450d5e3057269114a17b6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 31 Aug 2000 17:23:40 -0300 Subject: new API functions `pop', `insert', and `move' --- ltests.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 45b1f1c0..79b6d970 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.37 2000/08/29 19:05:11 roberto Exp roberto $ +** $Id: ltests.c,v 1.38 2000/08/31 13:29:47 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -341,7 +341,7 @@ static int getnum (lua_State *L, const char **pc) { skip(pc); if (**pc == '.') { res = (int)lua_tonumber(L, -1); - lua_settop(L, -1); + lua_pop(L, 1); (*pc)++; return res; } @@ -384,12 +384,21 @@ static int testC (lua_State *L) { else if EQ("settop") { lua_settop(L, getnum); } + else if EQ("pop") { + lua_pop(L, getnum); + } else if EQ("pushnum") { lua_pushnumber(L, getnum); } else if EQ("pushobject") { lua_pushobject(L, getnum); } + else if EQ("move") { + lua_move(L, getnum); + } + else if EQ("insert") { + lua_insert(L, getnum); + } else if EQ("next") { lua_next(L); } -- cgit v1.2.3-55-g6feb