Skip to content

Commit 92d2ea5

Browse files
committed
Add docs
1 parent c1391cf commit 92d2ea5

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

Doc/c-api/type.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,6 @@ The following functions and structs are used to create
272272
* :c:member:`~PyTypeObject.tp_vectorcall_offset`
273273
(see :ref:`PyMemberDef <pymemberdef-offsets>`)
274274
275-
The following fields cannot be set using :c:type:`PyType_Spec` and
276-
:c:type:`PyType_Slot` under the limited API:
277-
278-
* :c:member:`~PyBufferProcs.bf_getbuffer`
279-
* :c:member:`~PyBufferProcs.bf_releasebuffer`
280-
281275
Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be
282276
problematic on some platforms.
283277
To avoid issues, use the *bases* argument of
@@ -287,6 +281,11 @@ The following functions and structs are used to create
287281
288282
Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API.
289283
284+
.. versionchanged:: 3.11
285+
:c:member:`~PyBufferProcs.bf_getbuffer` and
286+
:c:member:`~PyBufferProcs.bf_releasebuffer` are now available
287+
under limited API.
288+
290289
.. c:member:: void *PyType_Slot.pfunc
291290
292291
The desired value of the slot. In most cases, this is a pointer

Doc/whatsnew/3.11.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,26 @@ New Features
657657
:c:macro:`PY_VERSION_HEX`.
658658
(Contributed by Gabriele N. Tornetta in :issue:`43931`.)
659659

660+
* :c:type:`Py_buffer` and APIs are now part of the limited API and the stable
661+
ABI:
662+
663+
* :c:func:`PyObject_CheckBuffer`
664+
* :c:func:`PyObject_GetBuffer`
665+
* :c:func:`PyBuffer_GetPointer`
666+
* :c:func:`PyBuffer_SizeFromFormat`
667+
* :c:func:`PyBuffer_ToContiguous`
668+
* :c:func:`PyBuffer_FromContiguous`
669+
* :c:func:`PyBuffer_CopyData`
670+
* :c:func:`PyBuffer_IsContiguous`
671+
* :c:func:`PyBuffer_FillContiguousStrides`
672+
* :c:func:`PyBuffer_FillInfo`
673+
* :c:func:`PyBuffer_Release`
674+
* :c:func:`PyMemoryView_FromBuffer`
675+
* :c:member:`~PyBufferProcs.bf_getbuffer` and
676+
:c:member:`~PyBufferProcs.bf_releasebuffer` type slots
677+
678+
(Contributed by Christian Heimes in :issue:`45459`.)
679+
660680

661681
Porting to Python 3.11
662682
----------------------
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Add :c:type:`Py_buffer` to limited API / stable ABI.
1+
:c:type:`Py_buffer` and various ``Py_buffer`` related functions are now
2+
part of the limited API and stable ABI.

0 commit comments

Comments
 (0)