diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.23 1999/02/25 19:13:56 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.24 1999/02/26 15:48:55 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -129,7 +129,7 @@ TObject *luaT_gettagmethod (int t, char *event) { | |||
129 | 129 | ||
130 | 130 | ||
131 | void luaT_settagmethod (int t, char *event, TObject *func) { | 131 | void luaT_settagmethod (int t, char *event, TObject *func) { |
132 | TObject temp = *func; | 132 | TObject temp; |
133 | int e = luaI_checkevent(event, luaT_eventname); | 133 | int e = luaI_checkevent(event, luaT_eventname); |
134 | checktag(t); | 134 | checktag(t); |
135 | if (!luaT_validevent(t, e)) | 135 | if (!luaT_validevent(t, e)) |
@@ -137,6 +137,7 @@ void luaT_settagmethod (int t, char *event, TObject *func) { | |||
137 | luaT_eventname[e], luaO_typenames[-t], | 137 | luaT_eventname[e], luaO_typenames[-t], |
138 | (t == LUA_T_ARRAY || t == LUA_T_USERDATA) ? " with default tag" | 138 | (t == LUA_T_ARRAY || t == LUA_T_USERDATA) ? " with default tag" |
139 | : ""); | 139 | : ""); |
140 | temp = *func; | ||
140 | *func = *luaT_getim(t,e); | 141 | *func = *luaT_getim(t,e); |
141 | *luaT_getim(t, e) = temp; | 142 | *luaT_getim(t, e) = temp; |
142 | } | 143 | } |