From 67c1afff5917b118f3be818dd0df7448d19de877 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 31 Oct 2000 11:10:24 -0200 Subject: lua_settagmethod does not return old tag method --- lbaselib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index e588f0c3..1973cb42 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.14 2000/10/24 19:19:15 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.15 2000/10/27 16:15:53 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -184,10 +184,13 @@ static int luaB_settagmethod (lua_State *L) { "function or nil expected"); if (strcmp(event, "gc") == 0) lua_error(L, "deprecated use: cannot set the `gc' tag method from Lua"); + lua_gettagmethod(L, tag, event); + lua_pushvalue(L, 3); lua_settagmethod(L, tag, event); return 1; } + static int luaB_gettagmethod (lua_State *L) { int tag = luaL_check_int(L, 1); const char *event = luaL_check_string(L, 2); -- cgit v1.2.3-55-g6feb