Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 37677:e795d6c86a5e legacy-trunk
Change maxsplit types to Py_ssize_t.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 13 Apr 2006 08:37:17 +0000 |
| parents | b1724e926e07 |
| children | 30d6b9eaf02d |
line wrap: on
line diff
--- a/Objects/stringobject.c Thu Apr 13 08:33:58 2006 +0000 +++ b/Objects/stringobject.c Thu Apr 13 08:37:17 2006 +0000 @@ -1407,11 +1407,11 @@ { 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 @@ { 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;
