bpo-42171: Add PEP573-related items to the limited API (GH-23009) · python/cpython@0b9c4c6 (original) (raw)
4 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -263,10 +263,12 @@ There are these calling conventions: | ||
263 | 263 | of :c:type:`PyObject*` values indicating the arguments and the third |
264 | 264 | parameter is the number of arguments (the length of the array). |
265 | 265 | |
266 | - This is not part of the :ref:`limited API `. | |
267 | - | |
268 | 266 | .. versionadded:: 3.7 |
269 | 267 | |
268 | + .. versionchanged:: 3.10 | |
269 | + | |
270 | + ``METH_FASTCALL`` is now part of the stable ABI. | |
271 | + | |
270 | 272 | |
271 | 273 | .. data:: METH_FASTCALL | METH_KEYWORDS |
272 | 274 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -73,7 +73,7 @@ PyAPI_FUNC(PyObject *) PyCMethod_New(PyMethodDef *, PyObject *, | ||
73 | 73 | |
74 | 74 | #define METH_COEXIST 0x0040 |
75 | 75 | |
76 | -#ifndef Py_LIMITED_API | |
76 | +#if !defined(Py_LIMITED_API) | | |
77 | 77 | #define METH_FASTCALL 0x0080 |
78 | 78 | #endif |
79 | 79 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1 | +The :c:data:`METH_FASTCALL` calling convention is added to the limited API. | |
2 | +The functions :c:func:`PyModule_AddType`, :c:func:`PyType_FromModuleAndSpec`, | |
3 | +:c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` are added to | |
4 | +the limited API on Windows. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -344,6 +344,7 @@ EXPORT_FUNC(PyModule_AddFunctions) | ||
344 | 344 | EXPORT_FUNC(PyModule_AddIntConstant) |
345 | 345 | EXPORT_FUNC(PyModule_AddObject) |
346 | 346 | EXPORT_FUNC(PyModule_AddStringConstant) |
347 | +EXPORT_FUNC(PyModule_AddType) | |
347 | 348 | EXPORT_FUNC(PyModule_Create2) |
348 | 349 | EXPORT_FUNC(PyModule_ExecDef) |
349 | 350 | EXPORT_FUNC(PyModule_FromDefAndSpec2) |
@@ -547,9 +548,12 @@ EXPORT_FUNC(PyTuple_Size) | ||
547 | 548 | EXPORT_FUNC(PyType_ClearCache) |
548 | 549 | EXPORT_FUNC(PyType_FromSpec) |
549 | 550 | EXPORT_FUNC(PyType_FromSpecWithBases) |
551 | +EXPORT_FUNC(PyType_FromModuleAndSpec) | |
550 | 552 | EXPORT_FUNC(PyType_GenericAlloc) |
551 | 553 | EXPORT_FUNC(PyType_GenericNew) |
552 | 554 | EXPORT_FUNC(PyType_GetFlags) |
555 | +EXPORT_FUNC(PyType_GetModule) | |
556 | +EXPORT_FUNC(PyType_GetModuleState) | |
553 | 557 | EXPORT_FUNC(PyType_GetSlot) |
554 | 558 | EXPORT_FUNC(PyType_IsSubtype) |
555 | 559 | EXPORT_FUNC(PyType_Modified) |