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

This commit is contained in:
Benjamin Peterson 2010-03-21 19:39:52 +00:00
parent d51b259b31
commit 88e7ebac4c
1 changed files with 1 additions and 1 deletions

View File

@ -3099,7 +3099,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
}
/* Speed hack: do raw pointer compares. As names are
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++) {
PyObject *nm = co_varnames[j];
if (nm == keyword)