summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-09 21:07:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-09 21:07:44 (GMT)
commitae8b69c410b83d92c6c35bbe342c3c2e92be6aa1 (patch)
treefa8de02f97c6831a0350d18c93e9aba25956187d /Include
parent502893896a6b2b312654e5b5d75398c759d715e1 (diff)
downloadcpython-ae8b69c410b83d92c6c35bbe342c3c2e92be6aa1.zip
cpython-ae8b69c410b83d92c6c35bbe342c3c2e92be6aa1.tar.gz
cpython-ae8b69c410b83d92c6c35bbe342c3c2e92be6aa1.tar.bz2
Issue #27810: Add _PyCFunction_FastCallKeywords()
Use _PyCFunction_FastCallKeywords() in ceval.c: it allows to remove a lot of code from ceval.c which was only used to call C functions.
Diffstat (limited to 'Include')
-rw-r--r--Include/abstract.h9
-rw-r--r--Include/methodobject.h5
2 files changed, 13 insertions, 1 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index f709434..3f398da 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -267,9 +267,16 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
PyObject *args, PyObject *kwargs);
#ifndef Py_LIMITED_API
- PyAPI_FUNC(PyObject*) _PyStack_AsTuple(PyObject **stack,
+ PyAPI_FUNC(PyObject*) _PyStack_AsTuple(
+ PyObject **stack,
Py_ssize_t nargs);
+ PyAPI_FUNC(PyObject *) _PyStack_AsDict(
+ PyObject **values,
+ Py_ssize_t nkwargs,
+ PyObject *kwnames,
+ PyObject *func);
+
/* Call the callable object func with the "fast call" calling convention:
args is a C array for positional arguments (nargs is the number of
positional arguments), kwargs is a dictionary for keyword arguments.
diff --git a/Include/methodobject.h b/Include/methodobject.h
index 84a1497..1f4f06c 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -42,6 +42,11 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
PyObject **args,
Py_ssize_t nargs,
PyObject *kwargs);
+
+PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func,
+ PyObject **stack,
+ Py_ssize_t nargs,
+ PyObject *kwnames);
#endif
struct PyMethodDef {