[Zodb-checkins] CVS: Zope/lib/python/BTrees - BucketTemplate.c:1.49

Tim Peters tim.one@comcast.net
Tue, 19 Nov 2002 14:07:53 -0500


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

Modified Files:
	BucketTemplate.c 
Log Message:
Backport from Zope3:  Don't compile bucket_append for flavors of BTree
that don't use it -- gcc complains if you do.


=== Zope/lib/python/BTrees/BucketTemplate.c 1.48 => 1.49 ===
--- Zope/lib/python/BTrees/BucketTemplate.c:1.48	Fri Oct  4 20:39:56 2002
+++ Zope/lib/python/BTrees/BucketTemplate.c	Tue Nov 19 14:07:53 2002
@@ -175,6 +175,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.
  *
@@ -261,7 +268,7 @@
 #endif
     return 0;
 }
-
+#endif /* MULTI_INT_UNION */
 
 /*
 ** _bucket_set: Assign a value to a key in a bucket, delete a key+value