diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:30:23 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:30:23 (GMT) |
commit | ad0a4629beac0600c4c4c3167b0d68be57ca674e (patch) | |
tree | a4aef28fd7dbf93c7dabde51ce88fe1748e29427 /Modules/itertoolsmodule.c | |
parent | 97c65a8068056863215eb3a14024c1e4a8d19b9f (diff) | |
download | cpython-ad0a4629beac0600c4c4c3167b0d68be57ca674e.zip cpython-ad0a4629beac0600c4c4c3167b0d68be57ca674e.tar.gz cpython-ad0a4629beac0600c4c4c3167b0d68be57ca674e.tar.bz2 |
Use Py_ssize_t for counts and sizes.
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r-- | Modules/itertoolsmodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 4b8ed69..a877749 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1054,7 +1054,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PyObject *seq; long start=0, stop=-1, step=1; PyObject *it, *a1=NULL, *a2=NULL, *a3=NULL; - int numargs; + Py_ssize_t numargs; isliceobject *lz; if (!_PyArg_NoKeywords("islice()", kwds)) @@ -1378,7 +1378,7 @@ imap_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *it, *iters, *func; imapobject *lz; - int numargs, i; + Py_ssize_t numargs, i; if (!_PyArg_NoKeywords("imap()", kwds)) return NULL; @@ -1466,7 +1466,7 @@ imap_next(imapobject *lz) PyObject *val; PyObject *argtuple; PyObject *result; - int numargs, i; + Py_ssize_t numargs, i; numargs = PyTuple_Size(lz->iters); argtuple = PyTuple_New(numargs); @@ -1547,7 +1547,7 @@ static PyTypeObject imap_type = { typedef struct { PyObject_HEAD - long tuplesize; + Py_ssize_t tuplesize; long iternum; /* which iterator is active */ PyObject *ittuple; /* tuple of iterators */ } chainobject; @@ -1558,7 +1558,7 @@ static PyObject * chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { chainobject *lz; - int tuplesize = PySequence_Length(args); + Py_ssize_t tuplesize = PySequence_Length(args); int i; PyObject *ittuple; @@ -2074,7 +2074,7 @@ static PyTypeObject count_type = { typedef struct { PyObject_HEAD - long tuplesize; + Py_ssize_t tuplesize; PyObject *ittuple; /* tuple of iterators */ PyObject *result; } izipobject; @@ -2088,7 +2088,7 @@ izip_new(PyTypeObject *type, PyObject *args, PyObject *kwds) int i; PyObject *ittuple; /* tuple of iterators */ PyObject *result; - int tuplesize = PySequence_Length(args); + Py_ssize_t tuplesize = PySequence_Length(args); if (!_PyArg_NoKeywords("izip()", kwds)) return NULL; @@ -2160,7 +2160,7 @@ static PyObject * izip_next(izipobject *lz) { int i; - long tuplesize = lz->tuplesize; + Py_ssize_t tuplesize = lz->tuplesize; PyObject *result = lz->result; PyObject *it; PyObject *item; |