]> granicus.if.org Git - python/commitdiff
Py_ssize_t issue; repr()'ing a very large string would result in a teensy
authorThomas Wouters <thomas@python.org>
Fri, 21 Apr 2006 13:54:43 +0000 (13:54 +0000)
committerThomas Wouters <thomas@python.org>
Fri, 21 Apr 2006 13:54:43 +0000 (13:54 +0000)
string, because of a cast to int.

Objects/stringobject.c

index 750882b992deeb2f237f3759701b953ad0e51ad0..166411a73cb2285f446343e2adf7ce713c2e5b25 100644 (file)
@@ -865,7 +865,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
                *p++ = quote;
                *p = '\0';
                _PyString_Resize(
-                       &v, (int) (p - PyString_AS_STRING(v)));
+                       &v, (p - PyString_AS_STRING(v)));
                return v;
        }
 }