FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Note the buffer slots can be set with PyType_Spec with the unlimited … by benjaminp · Pull Request #22031 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 10 additions & 1 deletion Doc/c-api/type.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,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`
Expand All @@ -239,13 +240,21 @@ 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should this contain a versionchanged annotation?

:c:type:`PyType_Slot` under the limited API:

* :c:member:`~PyBufferProcs.bf_getbuffer`
* :c:member:`~PyBufferProcs.bf_releasebuffer`

Setting :c:data:`Py_tp_bases` may be problematic on some platforms.
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
Expand Down

Back | FazBrowse Home | New Git URL