Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 8652:97a1108b0eb2 legacy-trunk
# In case BINARY_SUBSCR, use proper PyList_GET* macros instead of inlining.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 08 Jul 1998 15:02:37 +0000 |
| parents | 4ba9b70ca56e |
| children | e58a614fb8e4 |
line wrap: on
line diff
--- a/Python/ceval.c Wed Jul 08 14:58:16 1998 +0000 +++ b/Python/ceval.c Wed Jul 08 15:02:37 1998 +0000 @@ -849,15 +849,15 @@ /* INLINE: list[int] */ long i = PyInt_AsLong(w); if (i < 0) - i += ((PyListObject*) v)->ob_size; + i += PyList_GET_SIZE(v); if (i < 0 || - i >= ((PyListObject*) v)->ob_size) { + i >= PyList_GET_SIZE(v)) { PyErr_SetString(PyExc_IndexError, "list index out of range"); x = NULL; } else { - x = ((PyListObject*) v)->ob_item[i]; + x = PyList_GET_ITEM(v, i); Py_INCREF(x); } }
