diff options
author | Wenzel Jakob <wenzel.jakob@epfl.ch> | 2022-11-06 22:54:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 22:54:55 (GMT) |
commit | 57a405213cd7565b7c327b594378e22a5fb2817e (patch) | |
tree | b06aa9494174036d6fb234efb6c5d72cfa9a9b0d | |
parent | bd221c01ddcd2cad102133611fab3569a99680b0 (diff) | |
download | cpython-57a405213cd7565b7c327b594378e22a5fb2817e.zip cpython-57a405213cd7565b7c327b594378e22a5fb2817e.tar.gz cpython-57a405213cd7565b7c327b594378e22a5fb2817e.tar.bz2 |
gh-98586: Add What's New entry and update docs (#99056)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
-rw-r--r-- | Doc/c-api/call.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.12.rst | 12 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/Doc/c-api/call.rst b/Doc/c-api/call.rst index 6fb2e15..4dc66e3 100644 --- a/Doc/c-api/call.rst +++ b/Doc/c-api/call.rst @@ -93,7 +93,7 @@ This is a pointer to a function with the following signature: and they must be unique. If there are no keyword arguments, then *kwnames* can instead be *NULL*. -.. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET +.. data:: PY_VECTORCALL_ARGUMENTS_OFFSET If this flag is set in a vectorcall *nargsf* argument, the callee is allowed to temporarily change ``args[-1]``. In other words, *args* points to diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index fb28d67..53c72e9 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -677,6 +677,18 @@ New Features ``__dict__`` and weakrefs with less bookkeeping, using less memory and with faster access. +* API for performing calls using + :ref:`the vectorcall protocol <vectorcall>` was added to the + :ref:`Limited API <stable>`: + + * :c:func:`PyObject_Vectorcall` + * :c:func:`PyObject_VectorcallMethod` + * :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` + + This means that both the incoming and outgoing ends of the vector call + protocol are now available in the :ref:`Limited API <stable>`. (Contributed + by Wenzel Jakob in :gh:`98586`.) + * Added two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst b/Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst index 5d7b0c8..6a1ae35 100644 --- a/Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst +++ b/Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst @@ -1,6 +1,6 @@ Added the methods :c:func:`PyObject_Vectorcall` and :c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` along -with the auxiliary macro constant :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. +with the auxiliary macro constant :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. The availability of these functions enables more efficient :PEP:`590` vector calls from binary extension modules that avoid argument boxing/unboxing |