diff options
author | David Hewitt <mail@davidhewitt.dev> | 2024-02-15 10:05:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-15 10:05:20 (GMT) |
commit | 9e3729bbd77fb9dcaea6a06ac760160136d80b79 (patch) | |
tree | c0dee8e8044ce46296c28d1940d8987316db5e4a /Doc/c-api | |
parent | 32f8ab1ab65c13ed70f047ffd780ec1fe303ff1e (diff) | |
download | cpython-9e3729bbd77fb9dcaea6a06ac760160136d80b79.zip cpython-9e3729bbd77fb9dcaea6a06ac760160136d80b79.tar.gz cpython-9e3729bbd77fb9dcaea6a06ac760160136d80b79.tar.bz2 |
gh-114626: add PyCFunctionFast and PyCFunctionFastWithKeywords (GH-114627)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/structures.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 77f2b69..e2943f1 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -187,26 +187,26 @@ Implementing functions and methods PyObject *kwargs); -.. c:type:: _PyCFunctionFast +.. c:type:: PyCFunctionFast Type of the functions used to implement Python callables in C with signature :c:macro:`METH_FASTCALL`. The function signature is:: - PyObject *_PyCFunctionFast(PyObject *self, - PyObject *const *args, - Py_ssize_t nargs); + PyObject *PyCFunctionFast(PyObject *self, + PyObject *const *args, + Py_ssize_t nargs); -.. c:type:: _PyCFunctionFastWithKeywords +.. c:type:: PyCFunctionFastWithKeywords Type of the functions used to implement Python callables in C with signature :ref:`METH_FASTCALL | METH_KEYWORDS <METH_FASTCALL-METH_KEYWORDS>`. The function signature is:: - PyObject *_PyCFunctionFastWithKeywords(PyObject *self, - PyObject *const *args, - Py_ssize_t nargs, - PyObject *kwnames); + PyObject *PyCFunctionFastWithKeywords(PyObject *self, + PyObject *const *args, + Py_ssize_t nargs, + PyObject *kwnames); .. c:type:: PyCMethod @@ -290,7 +290,7 @@ There are these calling conventions: .. c:macro:: METH_FASTCALL Fast calling convention supporting only positional arguments. - The methods have the type :c:type:`_PyCFunctionFast`. + The methods have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the second parameter is a C array of :c:expr:`PyObject*` values indicating the arguments and the third parameter is the number of arguments (the length of the array). @@ -306,7 +306,7 @@ There are these calling conventions: :c:expr:`METH_FASTCALL | METH_KEYWORDS` Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, - with methods of type :c:type:`_PyCFunctionFastWithKeywords`. + with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword arguments are passed the same way as in the :ref:`vectorcall protocol <vectorcall>`: there is an additional fourth :c:expr:`PyObject*` parameter |