From: Serhiy Storchaka Date: Tue, 5 Mar 2024 16:26:29 +0000 (+0200) Subject: [3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368) X-Git-Tag: v3.11.9~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c67a4b6bdbc1b188f9e17242897e358740ed6783;p=thirdparty%2FPython%2Fcpython.git [3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368) (cherry picked from commit df594011089a83d151ac7000954665536f3461b5) --- diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 1d313545fc57..1c46a9c81e05 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -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 *);