aboutsummaryrefslogtreecommitdiff
path: root/lref.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-29 17:19:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-29 17:19:20 -0300
commita69356e9e0a7525b1cebadc928a0efcce8c39b46 (patch)
treec676ee2997c699d3e0b036323ecbafa7ea0d786f /lref.c
parentb53dc0c4853c56694dda727793e5f6188de39dd8 (diff)
downloadlua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.gz
lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.bz2
lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.zip
no more special cases for closures with 0 upvalues (performance is the same,
memory use a little higher, code much simpler).
Diffstat (limited to 'lref.c')
-rw-r--r--lref.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lref.c b/lref.c
index 4cbe4b48..99b6fda5 100644
--- a/lref.c
+++ b/lref.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lref.c,v 1.9 2000/03/10 18:37:44 roberto Exp roberto $ 2** $Id: lref.c,v 1.10 2000/03/27 20:10:21 roberto Exp roberto $
3** reference mechanism 3** reference mechanism
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -88,9 +88,7 @@ static int ismarked (const TObject *o) {
88 return o->value.a->marked; 88 return o->value.a->marked;
89 case TAG_LCLOSURE: case TAG_CCLOSURE: 89 case TAG_LCLOSURE: case TAG_CCLOSURE:
90 return o->value.cl->marked; 90 return o->value.cl->marked;
91 case TAG_LPROTO: 91 default: /* number */
92 return o->value.tf->marked;
93 default: /* number or cproto */
94 return 1; 92 return 1;
95 } 93 }
96} 94}