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' --- lbuiltin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lbuiltin.c') diff --git a/lbuiltin.c b/lbuiltin.c index f4368f56..348214e4 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -1,5 +1,5 @@ /* -** $Id: lbuiltin.c,v 1.125 2000/08/31 14:08:27 roberto Exp roberto $ +** $Id: lbuiltin.c,v 1.126 2000/08/31 16:52:06 roberto Exp roberto $ ** Built-in functions ** See Copyright Notice in lua.h */ @@ -92,7 +92,7 @@ int luaB_print (lua_State *L) { lua_error(L, "`tostring' must return a string to `print'"); if (i>1) fputs("\t", stdout); fputs(s, stdout); - lua_settop(L, -1); /* pop result */ + lua_pop(L, 1); /* pop result */ } fputs("\n", stdout); return 0; @@ -201,7 +201,7 @@ int luaB_settagmethod (lua_State *L) { lua_pushnil(L); /* to get its tag */ if (strcmp(event, "gc") == 0 && tag != lua_tag(L, -1)) lua_error(L, "deprecated use: cannot set the `gc' tag method from Lua"); - lua_settop(L, -1); /* remove the nil */ + lua_pop(L, 1); /* remove the nil */ lua_settagmethod(L, tag, event); return 1; } @@ -501,7 +501,7 @@ static int luaB_foreach (lua_State *L) { if (lua_call(L, 2, 1) != 0) lua_error(L, NULL); if (!lua_isnil(L, -1)) return 1; - lua_settop(L, -2); /* remove value and result */ + lua_pop(L, 2); /* remove value and result */ } } -- cgit v1.2.3-55-g6feb