[Zodb-checkins] CVS: ZODB3/BTrees - BucketTemplate.c:1.54.6.3

Tim Peters tim.one at comcast.net
Mon Jul 7 17:04:19 EDT 2003


Update of /cvs-repository/ZODB3/BTrees
In directory cvs.zope.org:/tmp/cvs-serv10058/BTrees

Modified Files:
      Tag: zodb33-devel-branch
	BucketTemplate.c 
Log Message:
bucket_traverse(), bucket_tp_clear():  Call the base class's traverse
and clear functions too.


=== ZODB3/BTrees/BucketTemplate.c 1.54.6.2 => 1.54.6.3 ===
--- ZODB3/BTrees/BucketTemplate.c:1.54.6.2	Thu Jul  3 17:38:59 2003
+++ ZODB3/BTrees/BucketTemplate.c	Mon Jul  7 16:04:14 2003
@@ -1538,8 +1538,11 @@
     if (self->ob_type == &BucketType)
 	assert(self->ob_type->tp_dictoffset == 0);
 
-    /* XXX Per_traverse isn't implemented yet. */
-    /* err = PyPersist_TYPE->tp_traverse((PyObject *)self, visit, arg); */
+    /* Call our base type's traverse function.  Because buckets are
+     * subclasses of Peristent, there must be one.
+     */
+    assert(self->ob_type->tp_base->tp_traverse);
+    err = self->ob_type->tp_base->tp_traverse((PyObject *)self, visit, arg);
     if (err)
 	goto Done;
 
@@ -1579,8 +1582,12 @@
 int
 bucket_tp_clear(Bucket *self)
 {
-    /* XXX Per_clear isn't implemented yet. */
-    /* PyPersist_TYPE->tp_clear((PyObject *)self); */
+    /* Call our base type's clear function.  Because buckets are
+     * subclasses of Peristent, there must be one.
+     */
+    assert(self->ob_type->tp_base->tp_clear);
+    self->ob_type->tp_base->tp_clear((PyObject *)self);
+
     if (self->state != cPersistent_GHOST_STATE)
 	_bucket_clear(self);
     return 0;




More information about the Zodb-checkins mailing list