diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-04-13 08:37:17 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-04-13 08:37:17 (GMT) |
commit | 9c83076b7b70aa3a36f3b3916ea376844d43c180 (patch) | |
tree | 9c259c6594313ecbe5384150d3366afc81527f9a /Objects | |
parent | 2f3f136b814f0d9178d1ebbfe27f3574d86f85e6 (diff) | |
download | cpython-9c83076b7b70aa3a36f3b3916ea376844d43c180.zip cpython-9c83076b7b70aa3a36f3b3916ea376844d43c180.tar.gz cpython-9c83076b7b70aa3a36f3b3916ea376844d43c180.tar.bz2 |
Change maxsplit types to Py_ssize_t.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index f64f2d8..dd602f5 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1407,11 +1407,11 @@ string_split(PyStringObject *self, PyObject *args) { Py_ssize_t len = PyString_GET_SIZE(self), n, i, j; int err; - int maxsplit = -1; + Py_ssize_t maxsplit = -1; const char *s = PyString_AS_STRING(self), *sub; PyObject *list, *item, *subobj = Py_None; - if (!PyArg_ParseTuple(args, "|Oi:split", &subobj, &maxsplit)) + if (!PyArg_ParseTuple(args, "|On:split", &subobj, &maxsplit)) return NULL; if (maxsplit < 0) maxsplit = PY_SSIZE_T_MAX; @@ -1548,11 +1548,11 @@ string_rsplit(PyStringObject *self, PyObject *args) { Py_ssize_t len = PyString_GET_SIZE(self), n, i, j; int err; - int maxsplit = -1; + Py_ssize_t maxsplit = -1; const char *s = PyString_AS_STRING(self), *sub; PyObject *list, *item, *subobj = Py_None; - if (!PyArg_ParseTuple(args, "|Oi:rsplit", &subobj, &maxsplit)) + if (!PyArg_ParseTuple(args, "|On:rsplit", &subobj, &maxsplit)) return NULL; if (maxsplit < 0) maxsplit = PY_SSIZE_T_MAX; |