GH-99767: update PyTypeObject docs for type watchers (GH-99928)

This commit is contained in:
Carl Meyer 2022-12-15 04:26:08 -07:00 committed by GitHub
parent 48e352a241
commit b7e4f1d97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -147,6 +147,8 @@ Quick Reference
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
| :c:member:`~PyTypeObject.tp_vectorcall` | :c:type:`vectorcallfunc` | | | | | |
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
| :c:member:`~PyTypeObject.tp_watched` | char | | | | | |
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
.. [#slots]
@ -2090,6 +2092,13 @@ and :c:type:`PyType_Type` effectively act as defaults.)
.. versionadded:: 3.9 (the field exists since 3.8 but it's only used since 3.9)
.. c:member:: char PyTypeObject.tp_watched
Internal. Do not use.
.. versionadded:: 3.12
.. _static-types:
Static Types

View File

@ -80,4 +80,7 @@ typedef struct _typeobject {
destructor tp_finalize;
vectorcallfunc tp_vectorcall;
/* bitset of which type-watchers care about this type */
char tp_watched;
} PyTypeObject;