lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 3d45a8eb1c28b71bb00bd353d2c1aa0da2162ce9
parent 3d80aeab5abb96fb720621a4cb93e1e6f3172499
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 17 May 2010 17:39:07 -0300

really stop collection during finalizers

Diffstat:
Mlgc.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lgc.c b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.94 2010/05/10 18:23:45 roberto Exp roberto $ +** $Id: lgc.c,v 2.95 2010/05/11 20:49:26 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -692,7 +692,7 @@ static void GCTM (lua_State *L, int propagateerrors) { lu_byte oldah = L->allowhook; lu_mem oldd = g->GCdebt; L->allowhook = 0; /* stop debug hooks during GC tag method */ - g->GCdebt = -2 * g->totalbytes; /* avoid GC steps */ + stopgc(g); /* avoid GC steps */ setobj2s(L, L->top, tm); /* push finalizer... */ setuvalue(L, L->top+1, udata); /* ... and its argument */ L->top += 2; /* and (next line) call the finalizer */