Use Py_ssize_t since we are working with list size below

This commit is contained in:
Neal Norwitz 2006-03-02 07:54:28 +00:00
parent e88d0a5d8a
commit 814e938d08

View File

@ -1174,7 +1174,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throw)
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)) {