diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-07 17:21:34 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-07 17:21:34 -0300 |
commit | d9e61e8ceafe8c3f6ad936979719ca7c446ce228 (patch) | |
tree | 0808ada3d7b7219022b9002503894c76c7253df6 /ltm.c | |
parent | 397905ef8694ec716a51acebc993bb625340d388 (diff) | |
download | lua-d9e61e8ceafe8c3f6ad936979719ca7c446ce228.tar.gz lua-d9e61e8ceafe8c3f6ad936979719ca7c446ce228.tar.bz2 lua-d9e61e8ceafe8c3f6ad936979719ca7c446ce228.zip |
new algorithm for traversing in GC to avoid deep recursion calls
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.43 2000/06/12 13:52:05 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.44 2000/08/04 19:38:35 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 | */ |
@@ -147,16 +147,3 @@ void luaT_settagmethod (lua_State *L, int t, const char *event, TObject *func) { | |||
147 | *luaT_getim(L, t, e) = temp; | 147 | *luaT_getim(L, t, e) = temp; |
148 | } | 148 | } |
149 | 149 | ||
150 | |||
151 | const char *luaT_travtagmethods (lua_State *L, | ||
152 | int (*fn)(lua_State *, TObject *)) { /* ORDER IM */ | ||
153 | int e; | ||
154 | for (e=IM_GETTABLE; e<=IM_FUNCTION; e++) { | ||
155 | int t; | ||
156 | for (t=0; t<=L->last_tag; t++) | ||
157 | if (fn(L, luaT_getim(L, t,e))) | ||
158 | return luaT_eventname[e]; | ||
159 | } | ||
160 | return NULL; | ||
161 | } | ||
162 | |||