Mercurial > cpython-lru_cache-weakref
diff Modules/_csv.c @ 34381:4bd180d171cc legacy-trunk
Add missing PyObject_GC_Track and PyObject_GC_UnTrack calls to csv reader and
writer objects (other GC infrastructure already in place).
| author | Andrew McNamara <andrewm@object-craft.com.au> |
|---|---|
| date | Mon, 10 Jan 2005 02:09:41 +0000 |
| parents | ba6e17271c62 |
| children | 3533e3cb7b97 |
line wrap: on
line diff
--- a/Modules/_csv.c Mon Jan 10 01:04:40 2005 +0000 +++ b/Modules/_csv.c Mon Jan 10 02:09:41 2005 +0000 @@ -776,6 +776,7 @@ 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 @@ return NULL; } + PyObject_GC_Track(self); return (PyObject *)self; } @@ -1234,6 +1236,7 @@ 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 @@ Py_DECREF(self); return NULL; } + PyObject_GC_Track(self); return (PyObject *)self; }
