]> granicus.if.org Git - python/commitdiff
PyUnicode_Join(): Missed a spot where I intended a cast from size_t to
authorTim Peters <tim.peters@gmail.com>
Fri, 27 Aug 2004 05:08:36 +0000 (05:08 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 27 Aug 2004 05:08:36 +0000 (05:08 +0000)
int.  I sure wish MS would gripe about that!  Whatever, note that the
statement above it guarantees that the cast loses no info.

Objects/unicodeobject.c

index 19b8c283a5331af69e22be2c0d4b45038daaf1d3..e4426d4fe453b37c1e51fc07d9fb3013cc5dcf2a 100644 (file)
@@ -4047,7 +4047,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
     sz = reslen + 100;  /* breathing room */
     if (sz < reslen || sz > INT_MAX) /* overflow -- no breathing room */
        sz = reslen;
-    res = _PyUnicode_New(sz);
+    res = _PyUnicode_New((int)sz);
     if (res == NULL) {
         Py_DECREF(item);
         goto onError;