summaryrefslogtreecommitdiff
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-03-28 20:36:50 +0000
committerGuido van Rossum <guido@python.org>2002-03-28 20:36:50 +0000
commit9ff1cf05fbcee1b98a4fc53ed12dc9b134a26f2f (patch)
tree3e1a310f5006d53c531c088167852f5272a081a0 /Objects/tupleobject.c
parentfe34d0facd54a6f471d73f3cba114dedc4f04969 (diff)
downloadcpython-git-9ff1cf05fbcee1b98a4fc53ed12dc9b134a26f2f.tar.gz
Backport to 2.2.1:
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/tupleobject.c')
-rw-r--r--Objects/tupleobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 27598ed6fe..ab792def93 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -139,8 +139,8 @@ tupledealloc(register PyTupleObject *op)
{
register int i;
register int len = op->ob_size;
+ PyObject_GC_UnTrack(op);
Py_TRASHCAN_SAFE_BEGIN(op)
- _PyObject_GC_UNTRACK(op);
if (len > 0) {
i = len;
while (--i >= 0)