mirror of
https://github.com/lua/lua
synced 2025-04-14 17:02:54 +03:00
really stop collection during finalizers
This commit is contained in:
parent
3d80aeab5a
commit
3d45a8eb1c
4
lgc.c
4
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
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -692,7 +692,7 @@ static void GCTM (lua_State *L, int propagateerrors) {
|
|||||||
lu_byte oldah = L->allowhook;
|
lu_byte oldah = L->allowhook;
|
||||||
lu_mem oldd = g->GCdebt;
|
lu_mem oldd = g->GCdebt;
|
||||||
L->allowhook = 0; /* stop debug hooks during GC tag method */
|
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... */
|
setobj2s(L, L->top, tm); /* push finalizer... */
|
||||||
setuvalue(L, L->top+1, udata); /* ... and its argument */
|
setuvalue(L, L->top+1, udata); /* ... and its argument */
|
||||||
L->top += 2; /* and (next line) call the finalizer */
|
L->top += 2; /* and (next line) call the finalizer */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user