Kaydet (Commit) 880430e2 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Replace structure member before decreffing.

üst 4c3d054d
......@@ -662,6 +662,7 @@ cycle_next(cycleobject *lz)
{
PyObject *item;
PyObject *it;
PyObject *tmp;
while (1) {
item = PyIter_Next(lz->it);
......@@ -681,9 +682,10 @@ cycle_next(cycleobject *lz)
it = PyObject_GetIter(lz->saved);
if (it == NULL)
return NULL;
Py_DECREF(lz->it);
tmp = lz->it;
lz->it = it;
lz->firstpass = 1;
Py_DECREF(tmp);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment