bpo-42171: Add PEP573-related items to the limited API (GH-23009)

This commit is contained in:
Petr Viktorin 2020-11-10 14:47:31 +01:00 committed by GitHub
parent 9303b9ecc3
commit 0b9c4c6fcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,4 @@
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.

View File

@ -344,6 +344,7 @@ EXPORT_FUNC(PyModule_AddFunctions)
EXPORT_FUNC(PyModule_AddIntConstant)
EXPORT_FUNC(PyModule_AddObject)
EXPORT_FUNC(PyModule_AddStringConstant)
EXPORT_FUNC(PyModule_AddType)
EXPORT_FUNC(PyModule_Create2)
EXPORT_FUNC(PyModule_ExecDef)
EXPORT_FUNC(PyModule_FromDefAndSpec2)
@ -547,9 +548,12 @@ EXPORT_FUNC(PyTuple_Size)
EXPORT_FUNC(PyType_ClearCache)
EXPORT_FUNC(PyType_FromSpec)
EXPORT_FUNC(PyType_FromSpecWithBases)
EXPORT_FUNC(PyType_FromModuleAndSpec)
EXPORT_FUNC(PyType_GenericAlloc)
EXPORT_FUNC(PyType_GenericNew)
EXPORT_FUNC(PyType_GetFlags)
EXPORT_FUNC(PyType_GetModule)
EXPORT_FUNC(PyType_GetModuleState)
EXPORT_FUNC(PyType_GetSlot)
EXPORT_FUNC(PyType_IsSubtype)
EXPORT_FUNC(PyType_Modified)