$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;
     }
