Change maxsplit types to Py_ssize_t.

This commit is contained in:
Martin v. Löwis 2006-04-13 08:37:17 +00:00
parent 2f3f136b81
commit 9c83076b7b
1 changed files with 4 additions and 4 deletions

View File

@ -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;