diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-19 15:38:01 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-19 15:38:01 (GMT) |
commit | dc5f808cbc8003f2256a0faabf27420c43cb8e20 (patch) | |
tree | d72f19da866e0ff35d3026a0c9192c634b5d47fb /Objects/stringobject.c | |
parent | c311f641e4a23ea1f8895357d836ee4ded96a080 (diff) | |
download | cpython-dc5f808cbc8003f2256a0faabf27420c43cb8e20.zip cpython-dc5f808cbc8003f2256a0faabf27420c43cb8e20.tar.gz cpython-dc5f808cbc8003f2256a0faabf27420c43cb8e20.tar.bz2 |
Make s.replace() work with explicit counts exceeding 2Gb.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index a0c6a53..750882b 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -2524,11 +2524,11 @@ string_replace(PyStringObject *self, PyObject *args) char *new_s; const Py_ssize_t len = PyString_GET_SIZE(self); Py_ssize_t sub_len, repl_len, out_len; - int count = -1; + Py_ssize_t count = -1; PyObject *newobj; PyObject *subobj, *replobj; - if (!PyArg_ParseTuple(args, "OO|i:replace", + if (!PyArg_ParseTuple(args, "OO|n:replace", &subobj, &replobj, &count)) return NULL; |