]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] 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:36 +0000 (11:03 +0100)
committerGitHub <noreply@github.com>
Wed, 6 Dec 2023 10:03:36 +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 8b662ceac84e7bd73f17c59ba1afc3a50fb50577..df43eafc377d01bdd1f9157cc28e38b30a30ebef 100644 (file)
@@ -341,13 +341,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 *                   |                      |
 +-----------------------------+-----------------------------+----------------------+
@@ -424,7 +424,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` * |
 |                             |                             |                      |