From 577c250b2c7b94db72d9e3983dd3cf2745d0f1cc Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 26 Jan 2006 16:17:40 +0000 Subject: [PATCH] Fix collection of weak tables, from Roberto Ierusalimschy, okay jolan@ --- lang/lua/Makefile | 4 ++-- lang/lua/patches/patch-src_lgc_c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 lang/lua/patches/patch-src_lgc_c diff --git a/lang/lua/Makefile b/lang/lua/Makefile index 1e2a8c36ae8..564a62ec6b0 100644 --- a/lang/lua/Makefile +++ b/lang/lua/Makefile @@ -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 diff --git a/lang/lua/patches/patch-src_lgc_c b/lang/lua/patches/patch-src_lgc_c new file mode 100644 index 00000000000..4218058bc00 --- /dev/null +++ b/lang/lua/patches/patch-src_lgc_c @@ -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; + }