Commit ce3858af authored by Jeremy Hylton's avatar Jeremy Hylton

In BTree and Bucket dealloc code, do not clear a ghost!

parent e779db8c
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
****************************************************************************/ ****************************************************************************/
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.35 2002/05/31 20:59:10 tim_one Exp $\n" #define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.36 2002/06/06 19:30:21 jeremy Exp $\n"
/* /*
** _BTree_get ** _BTree_get
...@@ -1217,7 +1217,8 @@ static struct PyMethodDef BTree_methods[] = { ...@@ -1217,7 +1217,8 @@ static struct PyMethodDef BTree_methods[] = {
static void static void
BTree_dealloc(BTree *self) BTree_dealloc(BTree *self)
{ {
_BTree_clear(self); if (self->state != cPersistent_GHOST_STATE)
_BTree_clear(self);
PER_DEL(self); PER_DEL(self);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
****************************************************************************/ ****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.32 2002/06/05 19:26:55 tim_one Exp $\n" #define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.33 2002/06/06 19:30:21 jeremy Exp $\n"
/* /*
** _bucket_get ** _bucket_get
...@@ -1164,12 +1164,13 @@ static struct PyMethodDef Bucket_methods[] = { ...@@ -1164,12 +1164,13 @@ static struct PyMethodDef Bucket_methods[] = {
static void static void
Bucket_dealloc(Bucket *self) 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); Py_DECREF(self->ob_type);
PyObject_Del(self); PyObject_Del(self);
} }
/* Code to access Bucket objects as mappings */ /* Code to access Bucket objects as mappings */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment