[Python-checkins] r45567 - python/trunk/Objects/stringobject.c
thomas.wouters
python-checkins at python.org
Wed Apr 19 17:38:03 CEST 2006
Author: thomas.wouters
Date: Wed Apr 19 17:38:01 2006
New Revision: 45567
Modified:
python/trunk/Objects/stringobject.c
Log:
Make s.replace() work with explicit counts exceeding 2Gb.
Modified: python/trunk/Objects/stringobject.c
==============================================================================
--- python/trunk/Objects/stringobject.c (original)
+++ python/trunk/Objects/stringobject.c Wed Apr 19 17:38:01 2006
@@ -2524,11 +2524,11 @@
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;
More information about the Python-checkins
mailing list