From 3d45a8eb1c28b71bb00bd353d2c1aa0da2162ce9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 17 May 2010 17:39:31 -0300 Subject: really stop collection during finalizers --- lgc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lgc.c') diff --git a/lgc.c b/lgc.c index 05991bd8..65182650 100644 --- 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 */ -- cgit v1.2.3-55-g6feb