[Python-checkins] cpython: Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tuple

victor.stinner python-checkins at python.org
Wed Jun 5 00:14:05 CEST 2013


http://hg.python.org/cpython/rev/52075f60719e
changeset:   84027:52075f60719e
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Jun 05 00:11:34 2013 +0200
summary:
  Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tuple
iterators: change the C type of tupleiterobject.it_index from long to
Py_ssize_t.

files:
  Objects/tupleobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -930,7 +930,7 @@
 
 typedef struct {
     PyObject_HEAD
-    long it_index;
+    Py_ssize_t it_index;
     PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
 } tupleiterobject;
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list