SF bug #733667: kwargs handled incorrectly

The fast_function() inlining optimization only
applies when there are zero keyword arguments.
This commit is contained in:
Raymond Hettinger 2003-05-31 07:04:16 +00:00
parent ca2a2f11d0
commit 40174c358f
2 changed files with 12 additions and 1 deletions

View file

@ -3468,7 +3468,7 @@ fast_function(PyObject *func, PyObject ***pp_stack, int n, int na, int nk)
PCALL(PCALL_FUNCTION);
PCALL(PCALL_FAST_FUNCTION);
if (argdefs == NULL && co->co_argcount == n &&
if (argdefs == NULL && co->co_argcount == n && nk==0 &&
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
PyFrameObject *f;
PyObject *retval = NULL;