From 47527d2d3ca6e235d06adf567246c2f3bd424f65 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 19 Mar 1997 18:12:34 -0300 Subject: [PATCH] setmethods should return old methods. --- fallback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fallback.c b/fallback.c index a451f60a..385a1495 100644 --- a/fallback.c +++ b/fallback.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_fallback="$Id: fallback.c,v 1.27 1997/03/11 18:44:28 roberto Exp roberto $"; +char *rcs_fallback="$Id: fallback.c,v 1.28 1997/03/19 19:41:10 roberto Exp roberto $"; #include #include @@ -268,6 +268,7 @@ void luaI_setintmethod (void) luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", 3, "function expected"); checktag(t); + luaI_pushobject(&luaI_IMtable[-t].int_method[e]); luaI_IMtable[-t].int_method[e] = *luaI_Address(func); } @@ -286,6 +287,7 @@ void luaI_setglobalmethod (void) lua_Object func = lua_getparam(2); luaL_arg_check(lua_isnil(func) || lua_isfunction(func), "setintmethod", 2, "function expected"); + luaI_pushobject(&gmethod[e]); gmethod[e] = *luaI_Address(func); }