[Zodb-checkins] CVS: Zope/lib/python/BTrees - SetOpTemplate.c:1.29

Tim Peters tim.one@comcast.net
Thu, 27 Jun 2002 18:24:16 -0400


Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv9484

Modified Files:
	SetOpTemplate.c 
Log Message:
multiunion():  Don't bother with bucket_append() when an input set/bucket
is empty.


=== Zope/lib/python/BTrees/SetOpTemplate.c 1.28 => 1.29 ===
         {
             Bucket *b = BUCKET(set);
-            int status;
+            int status = 0;
 
             UNLESS (PER_USE(b)) goto Error;
-            status = bucket_append(result, b, 0, b->len, 0, i < n-1);
+            if (b->len)
+                status = bucket_append(result, b, 0, b->len, 0, i < n-1);
             PER_UNUSE(b);
             if (status < 0) goto Error;
         }