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

Andreas Jung andreas@zope.com
Thu, 20 Dec 2001 15:16:53 -0500


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

Modified Files:
	BucketTemplate.c 
Log Message:
Collector #99: keys()/values() for Buckets broken due to wrong
calculated index fuer ..SetItem()


=== Zope/lib/python/BTrees/BucketTemplate.c 1.21 => 1.22 ===
     {
       COPY_KEY_TO_OBJECT(key, self->keys[i]);
-      if (PyList_SetItem(r, i, key) < 0) goto err;
+      if (PyList_SetItem(r, i-low , key) < 0) goto err;
     }
 
   PER_ALLOW_DEACTIVATION(self);
@@ -633,7 +633,7 @@
     {
       COPY_VALUE_TO_OBJECT(v, self->values[i]);
       UNLESS (v) goto err;
-      if (PyList_SetItem(r, i, v) < 0) goto err;
+      if (PyList_SetItem(r, i-low, v) < 0) goto err;
     }
 
   PER_ALLOW_DEACTIVATION(self);