lua

A copy of the Lua development repository
Log | Files | Refs | README

commit aadc35449ec2752c298a7a8fa6359a3a12c538ee
parent cdc8139e295a768ac581e0a7c784c1adfee0668b
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 24 Oct 2000 17:18:53 -0200

lua_settag does not pop its argument

Diffstat:
Mlapi.c | 3+--
Mlbaselib.c | 5++---
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lapi.c b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.106 2000/10/06 19:29:26 roberto Exp roberto $ +** $Id: lapi.c,v 1.107 2000/10/20 16:39:03 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -433,7 +433,6 @@ LUA_API void lua_settag (lua_State *L, int tag) { luaO_verror(L, "cannot change the tag of a %.20s", luaO_typename(L->top-1)); } - L->top--; } diff --git a/lbaselib.c b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.12 2000/10/20 16:39:03 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.13 2000/10/20 16:57:42 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -138,8 +138,7 @@ static int luaB_settag (lua_State *L) { luaL_checktype(L, 1, LUA_TTABLE); lua_pushvalue(L, 1); /* push table */ lua_settag(L, luaL_check_int(L, 2)); - lua_pop(L, 1); /* remove second argument */ - return 1; /* return first argument */ + return 1; /* return table */ } static int luaB_newtag (lua_State *L) {