]> granicus.if.org Git - python/commitdiff
unicode_memchr(): Squashed gratuitous int-vs-size_t mismatch (which
authorTim Peters <tim.peters@gmail.com>
Mon, 22 Apr 2002 19:00:10 +0000 (19:00 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 22 Apr 2002 19:00:10 +0000 (19:00 +0000)
gives a compiler wng under MSVC because of the resulting signed-vs-
unsigned comparison).

Objects/unicodeobject.c

index 2fe96681a0564dfb324496871211f8df99425c93..54db9aaddf0d266abb27704c56c893e13d964018 100644 (file)
@@ -4447,9 +4447,9 @@ static const char *stripformat[] = {"|O:lstrip", "|O:rstrip", "|O:strip"};
 static const Py_UNICODE *
 unicode_memchr(const Py_UNICODE *s, Py_UNICODE c, size_t n)
 {
-       int i;
-       for (i = 0; i<n; ++i)
-               if (s[i]==c)
+       size_t i;
+       for (i = 0; i < n; ++i)
+               if (s[i] == c)
                        return s+i;
        return NULL;
 }