[Zodb-checkins] CVS: Zope/lib/python/BTrees - BTreeTemplate.c:1.36 BucketTemplate.c:1.33
Jeremy Hylton
jeremy@zope.com
Thu, 6 Jun 2002 15:30:22 -0400
Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv8363
Modified Files:
BTreeTemplate.c BucketTemplate.c
Log Message:
In BTree and Bucket dealloc code, do not clear a ghost!
=== Zope/lib/python/BTrees/BTreeTemplate.c 1.35 => 1.36 ===
BTree_dealloc(BTree *self)
{
- _BTree_clear(self);
+ if (self->state != cPersistent_GHOST_STATE)
+ _BTree_clear(self);
PER_DEL(self);
=== Zope/lib/python/BTrees/BucketTemplate.c 1.32 => 1.33 ===
Bucket_dealloc(Bucket *self)
{
- _bucket_clear(self);
+ if (self->state != cPersistent_GHOST_STATE)
+ _bucket_clear(self);
- PER_DEL(self);
+ PER_DEL(self);
- Py_DECREF(self->ob_type);
- PyObject_Del(self);
+ Py_DECREF(self->ob_type);
+ PyObject_Del(self);
}
/* Code to access Bucket objects as mappings */