mirror of https://github.com/rusefi/lua.git
`luaL_getmetafield' was leaving extra value on the stack
This commit is contained in:
parent
ab9e062928
commit
b12776f29c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lauxlib.c,v 1.95 2003/02/11 15:32:31 roberto Exp roberto $
|
** $Id: lauxlib.c,v 1.96 2003/03/18 12:25:32 roberto Exp roberto $
|
||||||
** Auxiliary functions for building Lua libraries
|
** Auxiliary functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -202,8 +202,11 @@ LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) {
|
||||||
lua_pop(L, 2); /* remove metatable and metafield */
|
lua_pop(L, 2); /* remove metatable and metafield */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
lua_remove(L, -2); /* remove only metatable */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) {
|
LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) {
|
||||||
|
|
Loading…
Reference in New Issue