From 7aeff2687c0d1007f078c53e40c2787c30b966b2 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Tue, 9 Jun 2020 11:41:54 +0200 Subject: [PATCH 1/2] PyGetSetDef: "closure" is not a function pointer --- 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 b2392fa5e19c5a..df452de715b830 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -458,13 +458,13 @@ Accessing attributes of extension types +-------------+------------------+-----------------------------------+ | doc | const char \* | optional docstring | +-------------+------------------+-----------------------------------+ - | closure | void \* | optional function pointer, | + | closure | void \* | optional pointer, | | | | providing additional data for | | | | getter and setter | +-------------+------------------+-----------------------------------+ The ``get`` function takes one :c:type:`PyObject\*` parameter (the - instance) and a function pointer (the associated ``closure``):: + instance) and a generic pointer (the associated ``closure``):: typedef PyObject *(*getter)(PyObject *, void *); @@ -472,7 +472,7 @@ Accessing attributes of extension types on failure. ``set`` functions take two :c:type:`PyObject\*` parameters (the instance and - the value to be set) and a function pointer (the associated ``closure``):: + the value to be set) and a generic pointer (the associated ``closure``):: typedef int (*setter)(PyObject *, PyObject *, void *); From f6f7237a68a3a5152e280c64652395454579e6d6 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Mon, 3 Oct 2022 14:54:12 -0700 Subject: [PATCH 2/2] Updated structures.rst Updated format. --- 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 7ce5a58867e01c..d185b624dd2793 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -517,9 +517,9 @@ Accessing attributes of extension types +-------------+------------------+-----------------------------------+ | doc | const char \* | optional docstring | +-------------+------------------+-----------------------------------+ - | closure | void \* | optional pointer, | - | | | providing additional data for | - | | | getter and setter | + | closure | void \* | optional pointer, providing | + | | | additional data for getter | + | | | and setter | +-------------+------------------+-----------------------------------+ The ``get`` function takes one :c:type:`PyObject*` parameter (the