diff options
Diffstat (limited to '')
| -rw-r--r-- | ltm.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.c,v 1.16 1998/06/18 16:57:03 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.17 1998/08/21 17:43:44 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 | */ |
| @@ -148,8 +148,10 @@ void luaT_settagmethod (int t, char *event, TObject *func) | |||
| 148 | int e = luaI_checkevent(event, luaT_eventname); | 148 | int e = luaI_checkevent(event, luaT_eventname); |
| 149 | checktag(t); | 149 | checktag(t); |
| 150 | if (!validevent(t, e)) | 150 | if (!validevent(t, e)) |
| 151 | luaL_verror("settagmethod: cannot change tag method `%.20s' for tag %d", | 151 | luaL_verror("cannot change tag method `%.20s' for type `%.20s'%.20s", |
| 152 | luaT_eventname[e], t); | 152 | luaT_eventname[e], luaO_typenames[-t], |
| 153 | (t == LUA_T_ARRAY || t == LUA_T_USERDATA) ? " with default tag" | ||
| 154 | : ""); | ||
| 153 | *func = *luaT_getim(t,e); | 155 | *func = *luaT_getim(t,e); |
| 154 | *luaT_getim(t, e) = temp; | 156 | *luaT_getim(t, e) = temp; |
| 155 | } | 157 | } |
