Commit 88e7ebac authored by Benjamin Peterson's avatar Benjamin Peterson

co_varnames is certainly a tuple, so let's not waste time finding out

parent d51b259b
...@@ -3099,7 +3099,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals, ...@@ -3099,7 +3099,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
} }
/* Speed hack: do raw pointer compares. As names are /* Speed hack: do raw pointer compares. As names are
normally interned this should almost always hit. */ normally interned this should almost always hit. */
co_varnames = PySequence_Fast_ITEMS(co->co_varnames); co_varnames = ((PyTupleObject *)(co->co_varnames))->ob_item;
for (j = 0; j < co->co_argcount; j++) { for (j = 0; j < co->co_argcount; j++) {
PyObject *nm = co_varnames[j]; PyObject *nm = co_varnames[j];
if (nm == keyword) if (nm == keyword)
......
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