From 01f1ac36b13f4fb23527785add70afe64f275944 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 8 May 2002 14:34:23 -0300 Subject: `global' tables (registry, etc.) stored in proper place, not in the stack --- lgc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lgc.c') diff --git a/lgc.c b/lgc.c index cdfd6496..3ca610e6 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 1.134 2002/04/05 18:54:31 roberto Exp roberto $ +** $Id: lgc.c,v 1.135 2002/04/23 15:04:39 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -100,7 +100,6 @@ static void marktable (GCState *st, Table *h) { if (!ismarked(h)) { h->mark = st->tmark; /* chain it for later traversal */ st->tmark = h; - marktable(st, h->metatable); } } @@ -153,6 +152,9 @@ static void markstacks (GCState *st) { luaE_closethread(st->L, L1->previous); /* collect it */ continue; } + markobject(st, defaultmeta(L1)); + markobject(st, gt(L1)); + markobject(st, registry(L1)); for (o=L1->stack; otop; o++) markobject(st, o); lim = o; -- cgit v1.2.3-55-g6feb