new API for registry and C upvalues + new implementation for references

This commit is contained in:
Roberto Ierusalimschy
2001-10-17 19:12:57 -02:00
parent 7cd37142f4
commit 1e81da51ba
10 changed files with 111 additions and 123 deletions

5
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.111 2001/09/07 17:39:10 roberto Exp $
** $Id: lgc.c,v 1.112 2001/10/02 16:45:03 roberto Exp $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -171,8 +171,7 @@ static void markall (lua_State *L) {
marktagmethods(G(L), &st); /* mark tag methods */
markstacks(L, &st); /* mark all stacks */
marktable(&st, G(L)->type2tag);
marktable(&st, G(L)->registry);
marktable(&st, G(L)->weakregistry);
markobject(&st, &G(L)->registry);
while (st.tmark) { /* mark tables */
Hash *h = st.tmark; /* get first table from list */
st.tmark = h->mark; /* remove it from list */