]> granicus.if.org Git - python/commitdiff
Close #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 4 Jun 2013 21:02:46 +0000 (23:02 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 4 Jun 2013 21:02:46 +0000 (23:02 +0200)
change the C type of seqiterobject.it_index from long to Py_ssize_t.

Misc/NEWS
Objects/iterobject.c

index deeec0a8dcad7cea54c8b50df667b04d8cec22c4..d7ae7e19501205cb549a05a99286f8b26bbe4b51 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
 Core and Builtins
 -----------------
 
+- Issue #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
+  change the C type of seqiterobject.it_index from long to Py_ssize_t.
+
 - Issue #18065: Don't set __path__ to the package name for frozen packages.
 
 - Issue #18088: When reloading a module, unconditionally reset all relevant
index 9acd1b79d7a854795ef17c2b16ca6315dc2e146b..77ff8106fd214eb13a2b3075cfc95923cb7cc492 100644 (file)
@@ -4,7 +4,7 @@
 
 typedef struct {
     PyObject_HEAD
-    long      it_index;
+    Py_ssize_t it_index;
     PyObject *it_seq; /* Set to NULL when iterator is exhausted */
 } seqiterobject;