summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-08 15:02:37 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-08 15:02:37 (GMT)
commitfa00e958fd0ce7abc8931e48644da52338acd7ee (patch)
tree7f4d4005dca27a431520d1358ecef9ffa3ff36e5 /Python/ceval.c
parent7859f87fdbcc0679aa6ed9c181ee3826002ac5ca (diff)
downloadcpython-fa00e958fd0ce7abc8931e48644da52338acd7ee.zip
cpython-fa00e958fd0ce7abc8931e48644da52338acd7ee.tar.gz
cpython-fa00e958fd0ce7abc8931e48644da52338acd7ee.tar.bz2
# In case BINARY_SUBSCR, use proper PyList_GET* macros instead of inlining.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index d81f3fd..4331786 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -849,15 +849,15 @@ eval_code2(co, globals, locals,
/* 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);
}
}