summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-09-02 03:18:21 (GMT)
committerGitHub <noreply@github.com>2020-09-02 03:18:21 (GMT)
commite2977f6202de9226c4f72aeeb76f256709df9729 (patch)
tree8df166c1ba320e7412536f59ce1c5bdaf461adb1 /Doc
parentd14775ddbb067bcfa6eca516d3cbe968a8c1334e (diff)
downloadcpython-e2977f6202de9226c4f72aeeb76f256709df9729.zip
cpython-e2977f6202de9226c4f72aeeb76f256709df9729.tar.gz
cpython-e2977f6202de9226c4f72aeeb76f256709df9729.tar.bz2
Note the buffer slots can be set with PyType_Spec with the unlimited API. (GH-22052)
Follow up to f7c4e236429606e1c982cacf24e10fc86ef4462f. (cherry picked from commit 700fa1b836f315048e8b89ede5018a0c0a213946) Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/type.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index f387279..030304d 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -215,7 +215,8 @@ The following functions and structs are used to create
* ``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`
* ``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`
- The following fields cannot be set using :c:type:`PyType_Spec` and :c:type:`PyType_Slot`:
+ The following fields cannot be set at all using :c:type:`PyType_Spec` and
+ :c:type:`PyType_Slot`:
* :c:member:`~PyTypeObject.tp_dict`
* :c:member:`~PyTypeObject.tp_mro`
@@ -229,6 +230,10 @@ The following functions and structs are used to create
(see :ref:`PyMemberDef <pymemberdef-offsets>`)
* :c:member:`~PyTypeObject.tp_vectorcall_offset`
(see :ref:`PyMemberDef <pymemberdef-offsets>`)
+
+ The following fields cannot be set using :c:type:`PyType_Spec` and
+ :c:type:`PyType_Slot` under the limited API:
+
* :c:member:`~PyBufferProcs.bf_getbuffer`
* :c:member:`~PyBufferProcs.bf_releasebuffer`
@@ -236,6 +241,10 @@ The following functions and structs are used to create
To avoid issues, use the *bases* argument of
:py:func:`PyType_FromSpecWithBases` instead.
+ .. versionchanged:: 3.9
+
+ Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API.
+
.. c:member:: void *PyType_Slot.pfunc
The desired value of the slot. In most cases, this is a pointer