summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 4e3209f..5fda826 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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)) {