[Python-checkins] r42778 - python/trunk/Python/ceval.c

neal.norwitz python-checkins at python.org
Thu Mar 2 08:54:30 CET 2006


Author: neal.norwitz
Date: Thu Mar  2 08:54:28 2006
New Revision: 42778

Modified:
   python/trunk/Python/ceval.c
Log:
Use Py_ssize_t since we are working with list size below

Modified: python/trunk/Python/ceval.c
==============================================================================
--- python/trunk/Python/ceval.c	(original)
+++ python/trunk/Python/ceval.c	Thu Mar  2 08:54:28 2006
@@ -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)) {


More information about the Python-checkins mailing list