diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-05 10:00:17 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-05 10:00:17 -0300 |
| commit | 046a3d6173792b7d4d4d26a4e063e2fe383c10a7 (patch) | |
| tree | efe5a4544585084ab6e8d301847cc8568a1cc955 /ldebug.c | |
| parent | 001f2bdd0e2f8803889c1b5164b57a51e44aef5b (diff) | |
| download | lua-046a3d6173792b7d4d4d26a4e063e2fe383c10a7.tar.gz lua-046a3d6173792b7d4d4d26a4e063e2fe383c10a7.tar.bz2 lua-046a3d6173792b7d4d4d26a4e063e2fe383c10a7.zip | |
tag methods are always functions, so don't need to store a whole object
Diffstat (limited to 'ldebug.c')
| -rw-r--r-- | ldebug.c | 16 |
1 files changed, 9 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.43 2000/10/02 20:10:55 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.44 2000/10/05 12:14:08 roberto Exp roberto $ |
| 3 | ** Debug Interface | 3 | ** Debug Interface |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -203,12 +203,14 @@ static void lua_funcinfo (lua_State *L, lua_Debug *ar, StkId func) { | |||
| 203 | 203 | ||
| 204 | 204 | ||
| 205 | static const char *travtagmethods (lua_State *L, const TObject *o) { | 205 | static const char *travtagmethods (lua_State *L, const TObject *o) { |
| 206 | int e; | 206 | if (ttype(o) == LUA_TFUNCTION) { |
| 207 | for (e=0; e<IM_N; e++) { | 207 | int e; |
| 208 | int t; | 208 | for (e=0; e<TM_N; e++) { |
| 209 | for (t=0; t<=L->last_tag; t++) | 209 | int t; |
| 210 | if (luaO_equalObj(o, luaT_getim(L, t,e))) | 210 | for (t=0; t<=L->last_tag; t++) |
| 211 | return luaT_eventname[e]; | 211 | if (clvalue(o) == luaT_gettm(L, t, e)) |
| 212 | return luaT_eventname[e]; | ||
| 213 | } | ||
| 212 | } | 214 | } |
| 213 | return NULL; | 215 | return NULL; |
| 214 | } | 216 | } |
