Guido pointed out that I was missing a couple decrefs.

This commit is contained in:
Michael W. Hudson 2002-03-07 15:13:40 +00:00
parent 594bc80c46
commit 70ffddf8af
1 changed files with 7 additions and 1 deletions

View File

@ -233,6 +233,7 @@ structseq_reduce(PyStructSequence* self)
{ {
PyObject* tup; PyObject* tup;
PyObject* dict; PyObject* dict;
PyObject* result;
long n_fields, n_visible_fields; long n_fields, n_visible_fields;
int i; int i;
@ -259,7 +260,12 @@ structseq_reduce(PyStructSequence* self)
self->ob_item[i]); self->ob_item[i]);
} }
return Py_BuildValue("(O(OO))", self->ob_type, tup, dict); result = Py_BuildValue("(O(OO))", self->ob_type, tup, dict);
Py_DECREF(tup);
Py_DECREF(dict);
return result;
} }
static PySequenceMethods structseq_as_sequence = { static PySequenceMethods structseq_as_sequence = {