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

Objects/tupleobject.c

index 0a959092753937d75ae5386f7e388537f4cd0b81..d808e08aa1497a839db936080f0971fcb3d76d01 100644 (file)
@@ -930,7 +930,7 @@ PyTuple_Fini(void)
 
 typedef struct {
     PyObject_HEAD
-    long it_index;
+    Py_ssize_t it_index;
     PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
 } tupleiterobject;