From 2f3136b8f0b4845b29b2d7363ae2181a06b79750 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 27 May 2006 05:18:57 +0000 Subject: Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code looked duplicated, I wonder if a utility function could help reduce the duplication here.) --- Modules/itertoolsmodule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index c144825..86b1bbf 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1621,7 +1621,7 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds) /* obtain iterators */ assert(PyTuple_Check(args)); ittuple = PyTuple_New(tuplesize); - if(ittuple == NULL) + if (ittuple == NULL) return NULL; for (i=0; i < tuplesize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); @@ -1629,7 +1629,7 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (it == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, - "chain argument #%d must support iteration", + "chain argument #%zd must support iteration", i+1); Py_DECREF(ittuple); return NULL; @@ -2151,7 +2151,7 @@ izip_new(PyTypeObject *type, PyObject *args, PyObject *kwds) /* obtain iterators */ ittuple = PyTuple_New(tuplesize); - if(ittuple == NULL) + if (ittuple == NULL) return NULL; for (i=0; i < tuplesize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); @@ -2159,7 +2159,7 @@ izip_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (it == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_Format(PyExc_TypeError, - "izip argument #%d must support iteration", + "izip argument #%zd must support iteration", i+1); Py_DECREF(ittuple); return NULL; -- cgit v0.12