diff options
author | Guido van Rossum <guido@python.org> | 2000-07-01 01:00:38 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-07-01 01:00:38 +0000 |
commit | 4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe (patch) | |
tree | 33188a2be2a6d62e6f647f842303aa80ce9de474 /Objects/tupleobject.c | |
parent | ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66 (diff) | |
download | cpython-git-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.tar.gz |
Neil Schemenauer: small fixes for GC
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index f39f6c0885..7ce941703e 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -175,6 +175,7 @@ tupledealloc(op) } #endif } + op = (PyTupleObject *) PyObject_AS_GC(op); PyObject_DEL(op); done: Py_TRASHCAN_SAFE_END(op) @@ -559,6 +560,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky) *pv = (PyObject *) sv; if (sv == NULL) { PyObject_GC_Init((PyObject *)v); + v = (PyTupleObject *) PyObject_AS_GC(v); PyObject_DEL(v); PyErr_NoMemory(); return -1; @@ -595,6 +597,7 @@ PyTuple_Fini() while (p) { q = p; p = (PyTupleObject *)(p->ob_item[0]); + q = (PyTupleObject *) PyObject_AS_GC(q); PyObject_DEL(q); } } |