summaryrefslogtreecommitdiffstats
path: root/Include/abstract.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-24 22:29:32 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-08-24 22:29:32 (GMT)
commit577e1f8cb41b76ea763910a47abf42a1952ddec3 (patch)
treec813887a0af4c5b7312b2e835677546584c067ea /Include/abstract.h
parent53868aaabb154c11bf666b31662bb4ae8bc6ec79 (diff)
downloadcpython-577e1f8cb41b76ea763910a47abf42a1952ddec3.zip
cpython-577e1f8cb41b76ea763910a47abf42a1952ddec3.tar.gz
cpython-577e1f8cb41b76ea763910a47abf42a1952ddec3.tar.bz2
Add _PyObject_FastCallKeywords()
Issue #27830: Similar to _PyObject_FastCallDict(), but keyword arguments are also passed in the same C array than positional arguments, rather than being passed as a Python dict.
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 5820864..474d746 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -292,6 +292,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
#define _PyObject_CallArg1(func, arg) \
_PyObject_FastCall((func), &(arg), 1)
+ /* Call the callable object func with the "fast call" calling convention:
+ args is a C array for positional arguments followed by (key, value)
+ pairs for keyword arguments.
+
+ nargs is the number of positional parameters at the beginning of stack.
+ nkwargs is the number of (key, value) pairs at the end of stack.
+
+ If nargs and nkwargs are equal to zero, stack can be NULL.
+
+ Return the result on success. Raise an exception and return NULL on
+ error. */
+ PyAPI_FUNC(PyObject *) _PyObject_FastCallKeywords(
+ PyObject *func,
+ PyObject **stack,
+ Py_ssize_t nargs,
+ Py_ssize_t nkwargs);
+
PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func,
PyObject *result,
const char *where);