[Zodb-checkins] CVS: Zope3/lib/python/Persistence/BTrees - BucketTemplate.c:1.22
Tim Peters
tim.one@comcast.net
Tue, 19 Nov 2002 13:10:52 -0500
Update of /cvs-repository/Zope3/lib/python/Persistence/BTrees
In directory cvs.zope.org:/tmp/cvs-serv16846/lib/python/Persistence/BTrees
Modified Files:
BucketTemplate.c
Log Message:
Don't compiler bucket_append for flavors of BTree that don't use it --
gcc complains if you do.
=== Zope3/lib/python/Persistence/BTrees/BucketTemplate.c 1.21 => 1.22 ===
--- Zope3/lib/python/Persistence/BTrees/BucketTemplate.c:1.21 Thu Oct 10 17:36:17 2002
+++ Zope3/lib/python/Persistence/BTrees/BucketTemplate.c Tue Nov 19 13:10:51 2002
@@ -172,6 +172,13 @@
return -1;
}
+/* So far, bucket_append is called only by multiunion_m(), so is called
+ * only when MULTI_INT_UNION is defined. Flavors of BTree/Bucket that
+ * don't support MULTI_INT_UNION don't call bucket_append (yet), and
+ * gcc complains if bucket_append is compiled in those cases. So only
+ * compile bucket_append if it's going to be used.
+ */
+#ifdef MULTI_INT_UNION
/*
* Append a slice of the "from" bucket to self.
*
@@ -258,6 +265,7 @@
#endif
return 0;
}
+#endif /* MULTI_INT_UNION */
/*
** _bucket_set: Assign a value to a key in a bucket, delete a key+value
@@ -420,7 +428,7 @@
static int
bucket_setitem(Bucket *self, PyObject *key, PyObject *v)
{
- if (_bucket_set(self, key, v, 0, 0, 0) < 0)
+ if (_bucket_set(self, key, v, 0, 0, 0) < 0)
return -1;
return 0;
}
@@ -1451,7 +1459,7 @@
if (err) \
goto Done; \
}
-
+
if (self->ob_type == &BucketType)
assert(self->ob_type->tp_dictoffset == 0);