diff Objects/enumobject.c @ 36866:9eb24f92a784 legacy-trunk

Change int to Py_ssize_t in several places. Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
author Martin v. Löwis <martin@v.loewis.de>
date Tue, 07 Mar 2006 12:08:51 +0000
parents dba6494735d0
children aeee85b6a5dd f731859e9b3b
line wrap: on
line diff
--- a/Objects/enumobject.c	Tue Mar 07 11:58:50 2006 +0000
+++ b/Objects/enumobject.c	Tue Mar 07 12:08:51 2006 +0000
@@ -216,7 +216,7 @@
 reversed_next(reversedobject *ro)
 {
 	PyObject *item;
-	long index = ro->index;
+	Py_ssize_t index = ro->index;
 
 	if (index >= 0) {
 		item = PySequence_GetItem(ro->seq, index);