Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e89141

Browse filesBrowse files
[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 df59401) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 0f5cd44 commit 6e89141
Copy full SHA for 6e89141

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎Doc/c-api/structures.rst

Copy file name to clipboardExpand all lines: Doc/c-api/structures.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,20 +702,20 @@ Defining Getters and Setters
702702
703703
.. c:member:: void* closure
704704
705-
Optional function pointer, providing additional data for getter and setter.
705+
Optional user data pointer, providing additional data for getter and setter.
706706
707707
.. c:type:: PyObject *(*getter)(PyObject *, void *)
708708
709709
The ``get`` function takes one :c:expr:`PyObject*` parameter (the
710-
instance) and a function pointer (the associated ``closure``):
710+
instance) and a user data pointer (the associated ``closure``):
711711
712712
It should return a new reference on success or ``NULL`` with a set exception
713713
on failure.
714714
715715
.. c:type:: int (*setter)(PyObject *, PyObject *, void *)
716716
717717
``set`` functions take two :c:expr:`PyObject*` parameters (the instance and
718-
the value to be set) and a function pointer (the associated ``closure``):
718+
the value to be set) and a user data pointer (the associated ``closure``):
719719
720720
In case the attribute should be deleted the second parameter is ``NULL``.
721721
Should return ``0`` on success or ``-1`` with a set exception on failure.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.