userdata with finalizers are kept in a separated list ('udgc'), instead

of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
This commit is contained in:
Roberto Ierusalimschy
2010-03-24 10:07:01 -03:00
parent 5cb128ea54
commit 4433dbb5f5
5 changed files with 48 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.c,v 2.70 2010/03/19 21:04:17 roberto Exp roberto $
** $Id: lstate.c,v 2.71 2010/03/22 17:45:55 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -264,7 +264,8 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
g->panic = NULL;
g->version = lua_version(NULL);
g->gcstate = GCSpause;
g->rootgc = obj2gco(L);
g->allgc = obj2gco(L);
g->udgc = NULL;
g->tobefnz = NULL;
g->totalbytes = sizeof(LG);
g->gcpause = LUAI_GCPAUSE;