]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 83751-83752 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Fri, 6 Aug 2010 09:44:48 +0000 (09:44 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 6 Aug 2010 09:44:48 +0000 (09:44 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83751 | mark.dickinson | 2010-08-06 10:36:57 +0100 (Fri, 06 Aug 2010) | 1 line

  Issue #9526:  Remove outdated casts to int that were preventing the array module from working correctly with arrays > 2GB.
........
  r83752 | mark.dickinson | 2010-08-06 10:38:58 +0100 (Fri, 06 Aug 2010) | 1 line

  Misc/NEWS entry for r83751.
........

Misc/NEWS
Modules/arraymodule.c

index c844ebff77c5bff1396c28c4206e5d2894da3b39..af440f0cdf975db777454f75bea1bca9b1c5e834 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -142,6 +142,10 @@ Library
 Extension Modules
 -----------------
 
+- Issue #9526: Remove some outdated (int) casts that were preventing
+  the array module from working correctly with arrays of more than
+  2**31 elements.
+
 - Fix memory leak in ssl._ssl._test_decode_cert.
 
 - Issue #8065: Fix memory leak in readline module (from failure to
index 5b37896a14fc122deb0a3ce26fa74d33f5185a84..1602e4883df6cd8391e60300b21f3261217337ea 100644 (file)
@@ -798,7 +798,7 @@ array_iter_extend(arrayobject *self, PyObject *bb)
         return -1;
 
     while ((v = PyIter_Next(it)) != NULL) {
-        if (ins1(self, (int) Py_SIZE(self), v) != 0) {
+        if (ins1(self, Py_SIZE(self), v) != 0) {
             Py_DECREF(v);
             Py_DECREF(it);
             return -1;
@@ -1090,7 +1090,7 @@ the buffer length in bytes.");
 static PyObject *
 array_append(arrayobject *self, PyObject *v)
 {
-    return ins(self, (int) Py_SIZE(self), v);
+    return ins(self, Py_SIZE(self), v);
 }
 
 PyDoc_STRVAR(append_doc,