Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types#103511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a9679fab8dc0721fc5c52075ca51439de5d291731b2ba8084b03d431ec9d5a85cab8143ade585986bf26e7838ee93d86d1266834df96820637158af402ecc61701688db5d49b9d9911d06bcf5b0b6974833c525888dade78720b250474e69a975de9b9ddf21File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -395,3 +395,42 @@ Object Protocol | ||
| returns ``NULL`` if the object cannot be iterated. | ||
| .. versionadded:: 3.10 | ||
| .. c:function:: void *PyObject_GetTypeData(PyObject *o, PyTypeObject *cls) | ||
| Get a pointer to subclass-specific data reserved for *cls*. | ||
| The object *o* must be an instance of *cls*, and *cls* must have been | ||
| created using negative :c:member:`PyType_Spec.basicsize`. | ||
| Python does not check this. | ||
| On error, set an exception and return ``NULL``. | ||
encukou marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| .. versionadded:: 3.12 | ||
| .. c:function:: Py_ssize_t PyType_GetTypeDataSize(PyTypeObject *cls) | ||
| Return the size of the instance memory space reserved for *cls*, i.e. the size of the | ||
| memory :c:func:`PyObject_GetTypeData` returns. | ||
| This may be larger than requested using :c:member:`-PyType_Spec.basicsize <PyType_Spec.basicsize>`; | ||
| it is safe to use this larger size (e.g. with :c:func:`!memset`). | ||
| The type *cls* **must** have been created using | ||
| negative :c:member:`PyType_Spec.basicsize`. | ||
| Python does not check this. | ||
| On error, set an exception and return a negative value. | ||
erlend-aasland marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| .. versionadded:: 3.12 | ||
| .. c:function:: void *PyObject_GetItemData(PyObject *o) | ||
| Get a pointer to per-item data for a class with | ||
arhadthedev marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| :const:`Py_TPFLAGS_ITEMS_AT_END`. | ||
| On error, set an exception and return ``NULL``. | ||
| :py:exc:`TypeError` is raised if *o* does not have | ||
| :const:`Py_TPFLAGS_ITEMS_AT_END` set. | ||
erlend-aasland marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| .. versionadded:: 3.12 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.