]> granicus.if.org Git - python/commitdiff
Use Py_ssize_t since we are working with list size below
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 2 Mar 2006 07:54:28 +0000 (07:54 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 2 Mar 2006 07:54:28 +0000 (07:54 +0000)
Python/ceval.c

index 4e3209ff81b96d88eca47ec4af31e71608addc27..5fda826e36812ad1081a3e0563ff50bdeeed12ec 100644 (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)) {