https://github.com/python/cpython/commit/6e89141d73eb89f2d7c827555f0e1cdf5c86be31
commit: 6e89141d73eb89f2d7c827555f0e1cdf5c86be31
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-03-05T16:16:50Z
summary:

[3.12] Fix the PyGetSetDef documentation (GH-116056) (GH-116363)

closure is not a function pointer, it is a user data pointer.
(cherry picked from commit df594011089a83d151ac7000954665536f3461b5)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
M Doc/c-api/structures.rst

diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst
index 77f2b6991d770e..36a0abced0e3c5 100644
--- a/Doc/c-api/structures.rst
+++ b/Doc/c-api/structures.rst
@@ -702,12 +702,12 @@ Defining Getters and Setters
 
    .. c:member:: void* closure
 
-      Optional function pointer, providing additional data for getter and 
setter.
+      Optional user data pointer, providing additional data for getter and 
setter.
 
 .. c:type:: PyObject *(*getter)(PyObject *, void *)
 
    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``):
 
    It should return a new reference on success or ``NULL`` with a set exception
    on failure.
@@ -715,7 +715,7 @@ Defining Getters and Setters
 .. c:type:: int (*setter)(PyObject *, PyObject *, void *)
 
    ``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``):
 
    In case the attribute should be deleted the second parameter is ``NULL``.
    Should return ``0`` on success or ``-1`` with a set exception on failure.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to