diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-18 15:48:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-18 15:48:31 -0300 |
commit | b12776f29cda9157ccf6fdd4776f4f4ae73a326a (patch) | |
tree | a4f898d3295432fdf0c950c9d6eaf43be6ad5d29 | |
parent | ab9e062928f7b9201fd5366a34a4fc855d13bc46 (diff) | |
download | lua-b12776f29cda9157ccf6fdd4776f4f4ae73a326a.tar.gz lua-b12776f29cda9157ccf6fdd4776f4f4ae73a326a.tar.bz2 lua-b12776f29cda9157ccf6fdd4776f4f4ae73a326a.zip |
`luaL_getmetafield' was leaving extra value on the stack
-rw-r--r-- | lauxlib.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.95 2003/02/11 15:32:31 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.96 2003/03/18 12:25:32 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -202,7 +202,10 @@ LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) { | |||
202 | lua_pop(L, 2); /* remove metatable and metafield */ | 202 | lua_pop(L, 2); /* remove metatable and metafield */ |
203 | return 0; | 203 | return 0; |
204 | } | 204 | } |
205 | return 1; | 205 | else { |
206 | lua_remove(L, -2); /* remove only metatable */ | ||
207 | return 1; | ||
208 | } | ||
206 | } | 209 | } |
207 | 210 | ||
208 | 211 | ||