aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-20 15:28:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-20 15:28:11 -0300
commit888f91fa24d7561471acb87ddafc156408dd3617 (patch)
tree81d17820c81cf8c98bcff12b0ec7373b12e18bd8 /lgc.c
parentc1db0b2bf1ba9c5e60d77fd70f8de06aab2e0e93 (diff)
downloadlua-888f91fa24d7561471acb87ddafc156408dd3617.tar.gz
lua-888f91fa24d7561471acb87ddafc156408dd3617.tar.bz2
lua-888f91fa24d7561471acb87ddafc156408dd3617.zip
code check for upvalues
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lgc.c b/lgc.c
index d500549a..9b4c4eaa 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.88 2001/02/07 18:13:49 roberto Exp roberto $ 2** $Id: lgc.c,v 1.89 2001/02/20 18:15:33 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -62,8 +62,10 @@ static void protomark (Proto *f) {
62 62
63static void markclosure (GCState *st, Closure *cl) { 63static void markclosure (GCState *st, Closure *cl) {
64 if (!ismarked(cl)) { 64 if (!ismarked(cl)) {
65 if (!cl->isC) 65 if (!cl->isC) {
66 lua_assert(cl->nupvalues == cl->f.l->nupvalues);
66 protomark(cl->f.l); 67 protomark(cl->f.l);
68 }
67 cl->mark = st->cmark; /* chain it for later traversal */ 69 cl->mark = st->cmark; /* chain it for later traversal */
68 st->cmark = cl; 70 st->cmark = cl;
69 } 71 }