mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use Py_ssize_t since we are working with list size below
This commit is contained in:
parent
e88d0a5d8a
commit
814e938d08
1 changed files with 1 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue