Add _PyObject_FastCallKeywords()

Issue #27830: Add _PyObject_FastCallKeywords(): avoid the creation of a
temporary dictionary for keyword arguments.

Other changes:

* Cleanup call_function() and fast_function() (ex: rename nk to nkwargs)
* Remove now useless do_call(), replaced with _PyObject_FastCallKeywords()
This commit is contained in:
Victor Stinner 2016-09-09 12:36:44 -07:00
parent 84f6a8f725
commit d873572095
4 changed files with 130 additions and 55 deletions

View file

@ -64,6 +64,12 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
PyObject **args,
Py_ssize_t nargs,
PyObject *kwargs);
PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords(
PyObject *func,
PyObject **stack,
Py_ssize_t nargs,
PyObject *kwnames);
#endif
/* Macros for direct access to these values. Type checks are *not*