[Zope-Checkins] CVS: Zope3/lib/python/Persistence/BTrees - SetOpTemplate.c:1.7
Tim Peters
tim.one@comcast.net
Thu, 27 Jun 2002 18:26:17 -0400
Update of /cvs-repository/Zope3/lib/python/Persistence/BTrees
In directory cvs.zope.org:/tmp/cvs-serv9792
Modified Files:
SetOpTemplate.c
Log Message:
multiunion(): Don't bother with bucket_append() when an input set/bucket
is empty.
=== Zope3/lib/python/Persistence/BTrees/SetOpTemplate.c 1.6 => 1.7 ===
{
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;
}