diff Python/ceval.c @ 36803:8eaf9531a2de legacy-trunk

Use Py_ssize_t since we are working with list size below
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 02 Mar 2006 07:54:28 +0000
parents d0ca6302dd3c
children e9a7a2784e17
line wrap: on
line diff
--- a/Python/ceval.c	Thu Mar 02 07:51:44 2006 +0000
+++ b/Python/ceval.c	Thu Mar 02 07:54:28 2006 +0000
@@ -1174,7 +1174,7 @@
 			v = TOP();
 			if (PyList_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: list[int] */
-				long i = PyInt_AsLong(w);
+				Py_ssize_t i = PyInt_AsSsize_t(w);
 				if (i < 0)
 					i += PyList_GET_SIZE(v);
 				if (i >= 0 && i < PyList_GET_SIZE(v)) {