Clean trailing whitespace in itertoolsmodule.c.
This commit is contained in:
commit
d269b5e73d
|
@ -964,7 +964,7 @@ cycle_reduce(cycleobject *lz)
|
||||||
/* Create a new cycle with the iterator tuple, then set
|
/* Create a new cycle with the iterator tuple, then set
|
||||||
* the saved state on it.
|
* the saved state on it.
|
||||||
*/
|
*/
|
||||||
return Py_BuildValue("O(O)(Oi)", Py_TYPE(lz),
|
return Py_BuildValue("O(O)(Oi)", Py_TYPE(lz),
|
||||||
lz->it, lz->saved, lz->firstpass);
|
lz->it, lz->saved, lz->firstpass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3154,7 +3154,7 @@ permutations_reduce(permutationsobject *po)
|
||||||
goto err;
|
goto err;
|
||||||
PyTuple_SET_ITEM(indices, i, index);
|
PyTuple_SET_ITEM(indices, i, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
cycles = PyTuple_New(po->r);
|
cycles = PyTuple_New(po->r);
|
||||||
if (cycles == NULL)
|
if (cycles == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -3180,7 +3180,7 @@ permutations_setstate(permutationsobject *po, PyObject *state)
|
||||||
{
|
{
|
||||||
PyObject *indices, *cycles, *result;
|
PyObject *indices, *cycles, *result;
|
||||||
Py_ssize_t n, i;
|
Py_ssize_t n, i;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(state, "O!O!",
|
if (!PyArg_ParseTuple(state, "O!O!",
|
||||||
&PyTuple_Type, &indices,
|
&PyTuple_Type, &indices,
|
||||||
&PyTuple_Type, &cycles))
|
&PyTuple_Type, &cycles))
|
||||||
|
@ -3359,18 +3359,18 @@ static PyObject *
|
||||||
accumulate_next(accumulateobject *lz)
|
accumulate_next(accumulateobject *lz)
|
||||||
{
|
{
|
||||||
PyObject *val, *oldtotal, *newtotal;
|
PyObject *val, *oldtotal, *newtotal;
|
||||||
|
|
||||||
val = PyIter_Next(lz->it);
|
val = PyIter_Next(lz->it);
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (lz->total == NULL) {
|
if (lz->total == NULL) {
|
||||||
Py_INCREF(val);
|
Py_INCREF(val);
|
||||||
lz->total = val;
|
lz->total = val;
|
||||||
return lz->total;
|
return lz->total;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lz->binop == NULL)
|
if (lz->binop == NULL)
|
||||||
newtotal = PyNumber_Add(lz->total, val);
|
newtotal = PyNumber_Add(lz->total, val);
|
||||||
else
|
else
|
||||||
newtotal = PyObject_CallFunctionObjArgs(lz->binop, lz->total, val, NULL);
|
newtotal = PyObject_CallFunctionObjArgs(lz->binop, lz->total, val, NULL);
|
||||||
|
@ -3381,7 +3381,7 @@ accumulate_next(accumulateobject *lz)
|
||||||
oldtotal = lz->total;
|
oldtotal = lz->total;
|
||||||
lz->total = newtotal;
|
lz->total = newtotal;
|
||||||
Py_DECREF(oldtotal);
|
Py_DECREF(oldtotal);
|
||||||
|
|
||||||
Py_INCREF(newtotal);
|
Py_INCREF(newtotal);
|
||||||
return newtotal;
|
return newtotal;
|
||||||
}
|
}
|
||||||
|
@ -4351,7 +4351,7 @@ zip_longest_next(ziplongestobject *lz)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
zip_longest_reduce(ziplongestobject *lz)
|
zip_longest_reduce(ziplongestobject *lz)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Create a new tuple with empty sequences where appropriate to pickle.
|
/* Create a new tuple with empty sequences where appropriate to pickle.
|
||||||
* Then use setstate to set the fillvalue
|
* Then use setstate to set the fillvalue
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue