mirror of
https://github.com/lua/lua
synced 2024-12-27 12:49:43 +03:00
lua_settag does not pop its argument
This commit is contained in:
parent
cdc8139e29
commit
aadc35449e
3
lapi.c
3
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--;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user