]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 6 Dec 2023 10:03:22 +0000 (11:03 +0100)
committerGitHub <noreply@github.com>
Wed, 6 Dec 2023 10:03:22 +0000 (11:03 +0100)
gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters in slot typedefs table (GH-112742)

In the slot typedefs table, the parameter of `destructor`
and the first parameter of `traverseproc` should both be
`PyObject *` rather than `void *`.
Same for `inquiry`.
(cherry picked from commit 00cce0fe495ee820cd3ca5878bdbe3dd65b1be7b)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Doc/c-api/typeobj.rst

index 0988090194a5fe974b954d522ba546801cd1d009..b30c22f4fddeba42c4a925a3401819da8e9a489f 100644 (file)
@@ -343,13 +343,13 @@ slot typedefs
 |                             |    :c:type:`PyTypeObject` * |                      |
 |                             |    :c:type:`Py_ssize_t`     |                      |
 +-----------------------------+-----------------------------+----------------------+
-| :c:type:`destructor`        | void *                      | void                 |
+| :c:type:`destructor`        | :c:type:`PyObject` *        | void                 |
 +-----------------------------+-----------------------------+----------------------+
 | :c:type:`freefunc`          | void *                      | void                 |
 +-----------------------------+-----------------------------+----------------------+
 | :c:type:`traverseproc`      | .. line-block::             | int                  |
 |                             |                             |                      |
-|                             |    void *                   |                      |
+|                             |    :c:type:`PyObject` *     |                      |
 |                             |    :c:type:`visitproc`      |                      |
 |                             |    void *                   |                      |
 +-----------------------------+-----------------------------+----------------------+
@@ -426,7 +426,7 @@ slot typedefs
 |                             |    :c:type:`PyObject` *     |                      |
 |                             |    :c:type:`Py_buffer` *    |                      |
 +-----------------------------+-----------------------------+----------------------+
-| :c:type:`inquiry`           | void *                      | int                  |
+| :c:type:`inquiry`           | :c:type:`PyObject` *        | int                  |
 +-----------------------------+-----------------------------+----------------------+
 | :c:type:`unaryfunc`         | .. line-block::             | :c:type:`PyObject` * |
 |                             |                             |                      |