summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-03-28 20:34:59 (GMT)
committerGuido van Rossum <guido@python.org>2002-03-28 20:34:59 (GMT)
commitff413af605d7aab610272c5668bc870ebcbf56ef (patch)
tree1a79acab5df1da3a36e5b78c093793f192b2c269 /Objects/dictobject.c
parent31f8483eef19ebf40c7831d79cac270e69a96ce0 (diff)
downloadcpython-ff413af605d7aab610272c5668bc870ebcbf56ef.zip
cpython-ff413af605d7aab610272c5668bc870ebcbf56ef.tar.gz
cpython-ff413af605d7aab610272c5668bc870ebcbf56ef.tar.bz2
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).
The fix makes it possible to call PyObject_GC_UnTrack() more than once on the same object, and then move the PyObject_GC_UnTrack() call to *before* the trashcan code is invoked. BUGFIX CANDIDATE!
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 5803c57..a83a851 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -694,8 +694,8 @@ dict_dealloc(register dictobject *mp)
{
register dictentry *ep;
int fill = mp->ma_fill;
+ PyObject_GC_UnTrack(mp);
Py_TRASHCAN_SAFE_BEGIN(mp)
- _PyObject_GC_UNTRACK(mp);
for (ep = mp->ma_table; fill > 0; ep++) {
if (ep->me_key) {
--fill;