Commit 19f7f75f authored by Jim Fulton's avatar Jim Fulton

Bug fixed

- Changes in way that garage collection treats dictionaries in Python
  2.7 broke the object/connection cache implementation.
  (https://bugs.launchpad.net/zodb/+bug/641481)
parent a38cacc1
......@@ -8,6 +8,10 @@
Bugs fixed
----------
- Changes in way that garage collection treats dictionaries in Python
2.7 broke the object/connection cache implementation.
(https://bugs.launchpad.net/zodb/+bug/641481)
- Updated the 'repozo --kill-old-on-full' option to remove any '.index'
files corresponding to backups being removed.
......
......@@ -767,6 +767,7 @@ cc_new_ghost(ccobject *self, PyObject *args)
return NULL;
if (PyDict_SetItem(self->data, key, v) < 0)
return NULL;
PyObject_GC_UnTrack((void *)self->data);
self->klass_count++;
}
else
......@@ -782,6 +783,7 @@ cc_new_ghost(ccobject *self, PyObject *args)
if (PyDict_SetItem(self->data, key, v) < 0)
return NULL;
/* the dict should have a borrowed reference */
PyObject_GC_UnTrack((void *)self->data);
Py_DECREF(v);
Py_INCREF(self);
......@@ -1098,6 +1100,7 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v)
{
if (PyDict_SetItem(self->data, key, v) < 0)
return -1;
PyObject_GC_UnTrack((void *)self->data);
self->klass_count++;
return 0;
}
......@@ -1123,6 +1126,7 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v)
if (PyDict_SetItem(self->data, key, v) < 0)
return -1;
/* the dict should have a borrowed reference */
PyObject_GC_UnTrack((void *)self->data);
Py_DECREF(v);
p = (cPersistentObject *)v;
......
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