Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Add METH_FASTCALL to the limited API
  • Loading branch information
encukou committed Nov 3, 2020
commit 1b1ca477d3994192120ecc7891ee3cc2332a9d1f
6 changes: 4 additions & 2 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ There are these calling conventions:
of :c:type:`PyObject*` values indicating the arguments and the third
parameter is the number of arguments (the length of the array).

This is not part of the :ref:`limited API <stable>`.

.. versionadded:: 3.7

.. versionchanged:: 3.10

``METH_FASTCALL`` is now part of the stable ABI.


.. data:: METH_FASTCALL | METH_KEYWORDS

Expand Down
2 changes: 1 addition & 1 deletion Include/methodobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PyAPI_FUNC(PyObject *) PyCMethod_New(PyMethodDef *, PyObject *,

#define METH_COEXIST 0x0040

#ifndef Py_LIMITED_API
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03100000
#define METH_FASTCALL 0x0080
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
The :c:data:`METH_METHOD_ARGS_KWD` calling convention is added to allow
using :pep:`573` module state access from methods fron the limited API. The
functions :c:func:`PyModule_AddType`, :c:func:`PyType_FromModuleAndSpec`,
The :c:data:`METH_FASTCALL` calling convention is added to the limited API.
The functions :c:func:`PyModule_AddType`, :c:func:`PyType_FromModuleAndSpec`,
:c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` are added to
the limited API on Windows.