]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)
authorJohnny11502 <113304663+Johnny11502@users.noreply.github.com>
Thu, 3 Nov 2022 16:57:30 +0000 (12:57 -0400)
committerGitHub <noreply@github.com>
Thu, 3 Nov 2022 16:57:30 +0000 (17:57 +0100)
Doc/c-api/structures.rst

index 183ac144c50dd3a29b9310e41014ab4aa29caccf..5a20f07214fd51f6ad80ea0ce0dbcfd2ee64e509 100644 (file)
@@ -485,23 +485,25 @@ Accessing attributes of extension types
    Structure to define property-like access for a type. See also description of
    the :c:member:`PyTypeObject.tp_getset` slot.
 
-   +-------------+------------------+-----------------------------------+
-   | Field       | C Type           | Meaning                           |
-   +=============+==================+===================================+
-   | name        | const char \*    | attribute name                    |
-   +-------------+------------------+-----------------------------------+
-   | get         | getter           | C function to get the attribute   |
-   +-------------+------------------+-----------------------------------+
-   | set         | setter           | optional C function to set or     |
-   |             |                  | delete the attribute, if omitted  |
-   |             |                  | the attribute is readonly         |
-   +-------------+------------------+-----------------------------------+
-   | doc         | const char \*    | optional docstring                |
-   +-------------+------------------+-----------------------------------+
-   | closure     | void \*          | optional function pointer,        |
-   |             |                  | providing additional data for     |
-   |             |                  | getter and setter                 |
-   +-------------+------------------+-----------------------------------+
+   .. c:member:: const char* PyGetSetDef.name
+
+      attribute name
+
+   .. c:member:: getter PyGetSetDef.get
+
+      C funtion to get the attribute.
+
+   .. c:member:: setter PyGetSetDef.set
+
+      Optional C function to set or delete the attribute, if omitted the attribute is readonly.
+
+   .. c:member:: const char* PyGetSetDef.doc
+
+      optional docstring
+
+   .. c:member:: void* PyGetSetDef.closure
+
+      Optional function 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``)::