diff options
Diffstat (limited to 'Include')
| -rw-r--r-- | Include/abstract.h | 6 | ||||
| -rw-r--r-- | Include/cpython/abstract.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index c226aab..f36fafb 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -141,6 +141,12 @@ extern "C" { #endif +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000 +/* Call a callable Python object without any arguments */ +PyAPI_FUNC(PyObject *) PyObject_CallNoArgs(PyObject *func); +#endif + + /* Call a callable Python object 'callable' with arguments given by the tuple 'args' and keywords arguments given by the dictionary 'kwargs'. diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index d036912..415f3e1 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -144,7 +144,9 @@ _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs) return _PyObject_Vectorcall(func, args, (size_t)nargs, NULL); } -/* Call a callable without any arguments */ +/* Call a callable without any arguments + Private static inline function variant of public function + PyObject_CallNoArgs(). */ static inline PyObject * _PyObject_CallNoArg(PyObject *func) { return _PyObject_Vectorcall(func, NULL, 0, NULL); |
