[Zodb-checkins] CVS: ZODB3/BTrees - BTreeTemplate.c:1.74.10.6
BucketTemplate.c:1.54.6.5
Tim Peters
tim.one at comcast.net
Wed Jul 9 15:39:13 EDT 2003
Update of /cvs-repository/ZODB3/BTrees
In directory cvs.zope.org:/tmp/cvs-serv882/BTrees
Modified Files:
Tag: zodb33-devel-branch
BTreeTemplate.c BucketTemplate.c
Log Message:
Bucket and BTree deactivation routines: call ghostify() to become a
ghost. The inline ZODB4 code here was incorrect for the ZODB3 cache
(where ghostifying is a lot more involved than just stating the state
to GHOST). This caused the ZODB3 doubly-linked list of non-ghost
objects to become insane, leading to an infinite loop when crawling
over the ring, and indirectly causing an assertion error in Python's
cyclic gc(!).
=== ZODB3/BTrees/BTreeTemplate.c 1.74.10.5 => 1.74.10.6 ===
--- ZODB3/BTrees/BTreeTemplate.c:1.74.10.5 Tue Jul 8 15:03:37 2003
+++ ZODB3/BTrees/BTreeTemplate.c Wed Jul 9 14:39:06 2003
@@ -859,14 +859,9 @@
return NULL;
}
if (ghostify) {
- PyObject **pdict = _PyObject_GetDictPtr((PyObject *)self);
- if (pdict && *pdict) {
- Py_DECREF(*pdict);
- *pdict = NULL;
- }
if (_BTree_clear(self) < 0)
return NULL;
- self->state = cPersistent_GHOST_STATE;
+ PER_GHOSTIFY(self);
}
}
=== ZODB3/BTrees/BucketTemplate.c 1.54.6.4 => 1.54.6.5 ===
--- ZODB3/BTrees/BucketTemplate.c:1.54.6.4 Tue Jul 8 15:03:37 2003
+++ ZODB3/BTrees/BucketTemplate.c Wed Jul 9 14:39:06 2003
@@ -1051,14 +1051,9 @@
return NULL;
}
if (ghostify) {
- PyObject **pdict = _PyObject_GetDictPtr((PyObject *)self);
- if (pdict && *pdict) {
- Py_DECREF(*pdict);
- *pdict = NULL;
- }
if (_bucket_clear(self) < 0)
return NULL;
- self->state = cPersistent_GHOST_STATE;
+ PER_GHOSTIFY(self);
}
}
Py_INCREF(Py_None);
More information about the Zodb-checkins
mailing list