diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-05-29 03:32:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 03:32:42 (GMT) |
commit | 43cf7c864a2941b3f8f823e5928721dd286b7778 (patch) | |
tree | 4f9db7e29ee99fb5df4f919d558f79482dad1de4 /Doc/c-api/gcsupport.rst | |
parent | 8b55bc3f93a655bc803bff79725d5fe3f124e2f0 (diff) | |
download | cpython-43cf7c864a2941b3f8f823e5928721dd286b7778.zip cpython-43cf7c864a2941b3f8f823e5928721dd286b7778.tar.gz cpython-43cf7c864a2941b3f8f823e5928721dd286b7778.tar.bz2 |
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
Diffstat (limited to 'Doc/c-api/gcsupport.rst')
-rw-r--r-- | Doc/c-api/gcsupport.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index 338365b..4bd2fb3 100644 --- a/Doc/c-api/gcsupport.rst +++ b/Doc/c-api/gcsupport.rst @@ -38,8 +38,9 @@ Constructors for container types must conform to two rules: a :c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its subclass or subclasses. - Some APIs like :c:func:`PyType_FromSpecWithBases` or - :c:func:`PyType_FromSpec` will automatically populate the + When calling :c:func:`PyType_Ready` or some of the APIs that indirectly + call it like :c:func:`PyType_FromSpecWithBases` or + :c:func:`PyType_FromSpec` the interpreter will automatically populate the :c:member:`~PyTypeObject.tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields if the type inherits from a class that implements the garbage collector protocol and the child class |