diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-24 17:19:15 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-24 17:19:15 -0200 |
commit | aadc35449ec2752c298a7a8fa6359a3a12c538ee (patch) | |
tree | 3b7328e9e0b563852c54271746e6ce330c5cba81 | |
parent | cdc8139e295a768ac581e0a7c784c1adfee0668b (diff) | |
download | lua-aadc35449ec2752c298a7a8fa6359a3a12c538ee.tar.gz lua-aadc35449ec2752c298a7a8fa6359a3a12c538ee.tar.bz2 lua-aadc35449ec2752c298a7a8fa6359a3a12c538ee.zip |
lua_settag does not pop its argument
-rw-r--r-- | lapi.c | 3 | ||||
-rw-r--r-- | lbaselib.c | 5 |
2 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.106 2000/10/06 19:29:26 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.107 2000/10/20 16:39:03 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -433,7 +433,6 @@ LUA_API void lua_settag (lua_State *L, int tag) { | |||
433 | luaO_verror(L, "cannot change the tag of a %.20s", | 433 | luaO_verror(L, "cannot change the tag of a %.20s", |
434 | luaO_typename(L->top-1)); | 434 | luaO_typename(L->top-1)); |
435 | } | 435 | } |
436 | L->top--; | ||
437 | } | 436 | } |
438 | 437 | ||
439 | 438 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.12 2000/10/20 16:39:03 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.13 2000/10/20 16:57:42 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -138,8 +138,7 @@ static int luaB_settag (lua_State *L) { | |||
138 | luaL_checktype(L, 1, LUA_TTABLE); | 138 | luaL_checktype(L, 1, LUA_TTABLE); |
139 | lua_pushvalue(L, 1); /* push table */ | 139 | lua_pushvalue(L, 1); /* push table */ |
140 | lua_settag(L, luaL_check_int(L, 2)); | 140 | lua_settag(L, luaL_check_int(L, 2)); |
141 | lua_pop(L, 1); /* remove second argument */ | 141 | return 1; /* return table */ |
142 | return 1; /* return first argument */ | ||
143 | } | 142 | } |
144 | 143 | ||
145 | static int luaB_newtag (lua_State *L) { | 144 | static int luaB_newtag (lua_State *L) { |