[Python-checkins] python/dist/src/Modules itertoolsmodule.c, 1.36,
1.37
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sat Oct 2 12:56:50 CEST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3067
Modified Files:
itertoolsmodule.c
Log Message:
Replace structure member before decreffing.
Index: itertoolsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/itertoolsmodule.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- itertoolsmodule.c 28 Sep 2004 04:45:27 -0000 1.36
+++ itertoolsmodule.c 2 Oct 2004 10:56:43 -0000 1.37
@@ -662,6 +662,7 @@
{
PyObject *item;
PyObject *it;
+ PyObject *tmp;
while (1) {
item = PyIter_Next(lz->it);
@@ -681,9 +682,10 @@
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);
}
}
More information about the Python-checkins
mailing list