Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Clarify documentation about PyVectorcall_*
The documentation implies that PyVectorcall_NARGS, PyVectorcall_Function, and PyVectorcall_Call were available in Python 3.8.

This is half-true - they were available under a different name. I think it's clearer to set the "version added" to 3.9
  • Loading branch information
da-woods authored Jul 23, 2023
commit 3b9e279c8d593bc5e7fba303399a2d614d136503
6 changes: 3 additions & 3 deletions Doc/c-api/call.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Vectorcall Support API
However, the function ``PyVectorcall_NARGS`` should be used to allow
for future extensions.

.. versionadded:: 3.8
.. versionadded:: 3.9
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyVectorcall_NARGS() is defined as a static inline function in Python 3.8.0: https://github.com/python/cpython/blob/v3.8.0/Include/cpython/abstract.h#L75


.. c:function:: vectorcallfunc PyVectorcall_Function(PyObject *op)

Expand All @@ -152,7 +152,7 @@ Vectorcall Support API
This is mostly useful to check whether or not *op* supports vectorcall,
which can be done by checking ``PyVectorcall_Function(op) != NULL``.

.. versionadded:: 3.8
.. versionadded:: 3.9

.. c:function:: PyObject* PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *dict)

Expand All @@ -164,7 +164,7 @@ Vectorcall Support API
It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag
and it does not fall back to ``tp_call``.

.. versionadded:: 3.8
.. versionadded:: 3.9
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Python 3.8.0, PyVectorcall_Call() was already defined as a regular function: https://github.com/python/cpython/blob/v3.8.0/Include/cpython/abstract.h#L141



.. _capi-call:
Expand Down