gh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)

This commit is contained in:
Johnny11502 2022-11-03 12:57:30 -04:00 committed by GitHub
parent a60ddd31be
commit 00b6745f16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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