Kaydet (Commit) fa00e958 authored tarafından Guido van Rossum's avatar Guido van Rossum

# In case BINARY_SUBSCR, use proper PyList_GET* macros instead of inlining.

üst 7859f87f
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment