]> granicus.if.org Git - python/commitdiff
use Py_ssize_t for string indexes (thanks, neal!)
authorFredrik Lundh <fredrik@pythonware.com>
Wed, 24 May 2006 10:20:36 +0000 (10:20 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Wed, 24 May 2006 10:20:36 +0000 (10:20 +0000)
Objects/unicodeobject.c

index c5e87a8519e18bf3477c90e8377fc896fe32b6ff..4bb0eae8c738afd41d900daf2ed21917a6ed8241 100644 (file)
@@ -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;