From c67a4b6bdbc1b188f9e17242897e358740ed6783 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 5 Mar 2024 18:26:29 +0200 Subject: [PATCH] [3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368) (cherry picked from commit df594011089a83d151ac7000954665536f3461b5) --- Doc/c-api/structures.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 *); -- 2.47.3