diff options
author | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-10 02:09:41 (GMT) |
---|---|---|
committer | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-10 02:09:41 (GMT) |
commit | 77ead87f30867443d18531812a0bbd83db1f6b0d (patch) | |
tree | 335aea76fc9eaf71ff5396448d26bc01b0149143 /Modules | |
parent | 36a7691c2dc4a11ceebacb149e69b01226962d69 (diff) | |
download | cpython-77ead87f30867443d18531812a0bbd83db1f6b0d.zip cpython-77ead87f30867443d18531812a0bbd83db1f6b0d.tar.gz cpython-77ead87f30867443d18531812a0bbd83db1f6b0d.tar.bz2 |
Add missing PyObject_GC_Track and PyObject_GC_UnTrack calls to csv reader and
writer objects (other GC infrastructure already in place).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_csv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index 13445b8..ba49236 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -776,6 +776,7 @@ Reader_iternext(ReaderObj *self) static void Reader_dealloc(ReaderObj *self) { + PyObject_GC_UnTrack(self); Py_XDECREF(self->dialect); Py_XDECREF(self->input_iter); Py_XDECREF(self->fields); @@ -909,6 +910,7 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args) return NULL; } + PyObject_GC_Track(self); return (PyObject *)self; } @@ -1234,6 +1236,7 @@ static struct PyMemberDef Writer_memberlist[] = { static void Writer_dealloc(WriterObj *self) { + PyObject_GC_UnTrack(self); Py_XDECREF(self->dialect); Py_XDECREF(self->writeline); if (self->rec != NULL) @@ -1349,6 +1352,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) Py_DECREF(self); return NULL; } + PyObject_GC_Track(self); return (PyObject *)self; } |