]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-99767: update PyTypeObject docs for type watchers (GH-99928)
authorCarl Meyer <carl@oddbird.net>
Thu, 15 Dec 2022 11:26:08 +0000 (04:26 -0700)
committerGitHub <noreply@github.com>
Thu, 15 Dec 2022 11:26:08 +0000 (11:26 +0000)
Doc/c-api/typeobj.rst
Doc/includes/typestruct.h

index 8f8869ec668a8dafea96cc7fe0e2531c14260b81..c7b318b21853e5bd7c1a5c1744285329ab8deeee 100644 (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
index 02f8ccfe4438a5a0abec1a3c2f208dd375028c32..f0ad1e47cb0d86cf93fdcd363db857606c916b62 100644 (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;