code check for upvalues

This commit is contained in:
Roberto Ierusalimschy
2001-02-20 15:28:11 -03:00
parent c1db0b2bf1
commit 888f91fa24
6 changed files with 21 additions and 18 deletions

6
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.88 2001/02/07 18:13:49 roberto Exp roberto $
** $Id: lgc.c,v 1.89 2001/02/20 18:15:33 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -62,8 +62,10 @@ static void protomark (Proto *f) {
static void markclosure (GCState *st, Closure *cl) {
if (!ismarked(cl)) {
if (!cl->isC)
if (!cl->isC) {
lua_assert(cl->nupvalues == cl->f.l->nupvalues);
protomark(cl->f.l);
}
cl->mark = st->cmark; /* chain it for later traversal */
st->cmark = cl;
}