Skip to content

Commit 11b4bca

Browse files
committed
pythongh-98586: add whatsnew entry, related documentation fix
PR python#98587 addressing issue python#98586 lacked a "what's new" entry. While making those changes, I noticed an inconsistency in how ``PY_VECTORCALL_ARGUMENTS_OFFSET`` is declared in the underlying Sphinx markup when compared to other macro constants like ``Py_TPFLAGS_HAVE_VECTORCALL``. This PR fixes that as well, which should connect a few currently broken cross-references
1 parent f4adb97 commit 11b4bca

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Doc/c-api/call.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This is a pointer to a function with the following signature:
9393
and they must be unique.
9494
If there are no keyword arguments, then *kwnames* can instead be *NULL*.
9595

96-
.. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET
96+
.. data:: PY_VECTORCALL_ARGUMENTS_OFFSET
9797

9898
If this flag is set in a vectorcall *nargsf* argument, the callee is allowed
9999
to temporarily change ``args[-1]``. In other words, *args* points to

Doc/whatsnew/3.12.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,18 @@ New Features
622622
``__dict__`` and weakrefs with less bookkeeping,
623623
using less memory and with faster access.
624624

625+
* API for performing calls using the
626+
:ref:`the vectorcall protocol <vectorcall>` was added to the
627+
:ref:`Limited API <stable>`:
628+
629+
* :c:func:`PyObject_Vectorcall`
630+
* :c:func:`PyObject_VectorcallMethod`
631+
* :const:`Py_TPFLAGS_HAVE_VECTORCALL`
632+
633+
Together with the previous change, this covers both receiving and outgoing
634+
ends of the vector call protocol. (Contributed by Wenzel Jakob in
635+
:gh:`98586`.)
636+
625637
* Added two new public functions,
626638
:c:func:`PyEval_SetProfileAllThreads` and
627639
:c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling

Misc/NEWS.d/next/Core and Builtins/2022-10-24-10-30-30.gh-issue-98586.Tha5Iy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Added the methods :c:func:`PyObject_Vectorcall` and
22
:c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` along
3-
with the auxiliary macro constant :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`.
3+
with the auxiliary macro constant :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`.
44

55
The availability of these functions enables more efficient :PEP:`590` vector
66
calls from binary extension modules that avoid argument boxing/unboxing

0 commit comments

Comments
 (0)