]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 5 Mar 2024 16:26:29 +0000 (18:26 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Mar 2024 16:26:29 +0000 (16:26 +0000)
(cherry picked from commit df594011089a83d151ac7000954665536f3461b5)

Doc/c-api/structures.rst

index 1d313545fc57be89fb847978f949bedd86dc3759..1c46a9c81e0547ee5bee8f6c2cceee82c0fe59ca 100644 (file)
@@ -570,13 +570,13 @@ Accessing attributes of extension types
    +-------------+------------------+-----------------------------------+
    | doc         | const char \*    | optional docstring                |
    +-------------+------------------+-----------------------------------+
-   | closure     | void \*          | optional function pointer,        |
+   | closure     | void \*          | optional user data pointer,       |
    |             |                  | providing additional data for     |
    |             |                  | getter and setter                 |
    +-------------+------------------+-----------------------------------+
 
    The ``get`` function takes one :c:expr:`PyObject*` parameter (the
-   instance) and a function pointer (the associated ``closure``)::
+   instance) and a user data pointer (the associated ``closure``)::
 
       typedef PyObject *(*getter)(PyObject *, void *);
 
@@ -584,7 +584,7 @@ Accessing attributes of extension types
    on failure.
 
    ``set`` functions take two :c:expr:`PyObject*` parameters (the instance and
-   the value to be set) and a function pointer (the associated ``closure``)::
+   the value to be set) and a user data pointer (the associated ``closure``)::
 
       typedef int (*setter)(PyObject *, PyObject *, void *);