mirror of https://github.com/python/cpython
Guido pointed out that I was missing a couple decrefs.
This commit is contained in:
parent
594bc80c46
commit
70ffddf8af
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in New Issue