From cdd0fe99464d7fb754f409dfec3277956eb30b83 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 21 May 1999 16:41:49 -0300 Subject: some C compilers cannot initialize a local struct --- ltm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ltm.c') diff --git a/ltm.c b/ltm.c index d827baa1..a9b3b515 100644 --- a/ltm.c +++ b/ltm.c @@ -1,5 +1,5 @@ /* -** $Id: ltm.c,v 1.23 1999/02/25 19:13:56 roberto Exp roberto $ +** $Id: ltm.c,v 1.24 1999/02/26 15:48:55 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -129,7 +129,7 @@ TObject *luaT_gettagmethod (int t, char *event) { void luaT_settagmethod (int t, char *event, TObject *func) { - TObject temp = *func; + TObject temp; int e = luaI_checkevent(event, luaT_eventname); checktag(t); if (!luaT_validevent(t, e)) @@ -137,6 +137,7 @@ void luaT_settagmethod (int t, char *event, TObject *func) { luaT_eventname[e], luaO_typenames[-t], (t == LUA_T_ARRAY || t == LUA_T_USERDATA) ? " with default tag" : ""); + temp = *func; *func = *luaT_getim(t,e); *luaT_getim(t, e) = temp; } -- cgit v1.2.3-55-g6feb