From: Fredrik Lundh Date: Wed, 24 May 2006 10:20:36 +0000 (+0000) Subject: use Py_ssize_t for string indexes (thanks, neal!) X-Git-Tag: v2.5b1~559 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=240bf2a8e48369e330bfd25e3a346e3f18151006;p=python use Py_ssize_t for string indexes (thanks, neal!) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c5e87a8519..4bb0eae8c7 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5068,8 +5068,8 @@ int PyUnicode_Contains(PyObject *container, } } } else { - int start = 0; - int end = PyUnicode_GET_SIZE(u) - size; + Py_ssize_t start = 0; + Py_ssize_t end = PyUnicode_GET_SIZE(u) - size; for (; start <= end; start++) if (Py_UNICODE_MATCH(u, start, v)) { result = 1;