Fix collection of weak tables, from Roberto Ierusalimschy, okay jolan@

This commit is contained in:
pedro 2006-01-26 16:17:40 +00:00
parent 8978f7cd11
commit 577c250b2c
2 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.19 2006/01/21 01:29:40 jolan Exp $
# $OpenBSD: Makefile,v 1.20 2006/01/26 16:17:40 pedro Exp $
COMMENT= "powerful, light-weight programming language"
DISTNAME= lua-5.0.2
PKGNAME= ${DISTNAME}p5
PKGNAME= ${DISTNAME}p6
SHARED_LIBS= lua 5.0 \
lualib 5.0
CATEGORIES= lang

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_lgc_c,v 1.1 2006/01/26 16:17:40 pedro Exp $
--- src/lgc.c.orig Thu Jan 26 11:01:11 2006
+++ src/lgc.c Thu Jan 26 11:01:42 2006
@@ -368,7 +368,7 @@ static int sweeplist (lua_State *L, GCOb
GCObject *curr;
int count = 0; /* number of collected items */
while ((curr = *p) != NULL) {
- if (curr->gch.marked > limit) {
+ if ((curr->gch.marked & ~(KEYWEAK | VALUEWEAK)) > limit) {
unmark(curr);
p = &curr->gch.next;
}