]> granicus.if.org Git - python/commitdiff
co_varnames is certainly a tuple, so let's not waste time finding out
authorBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 19:39:52 +0000 (19:39 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 19:39:52 +0000 (19:39 +0000)
Python/ceval.c

index b1d73462f90a970eb1e417342338634f7f97d876..7ce3e514e1e9207d1c554317d50c54653210c0df 100644 (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)