Skip to content

Commit

Permalink
Document PyMember_GetOne and PyMember_SetOne (GH-27555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner committed Aug 2, 2021
1 parent 043cd60 commit d382bde
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,21 @@ Accessing attributes of extension types
{NULL} /* Sentinel */
};
.. c:function:: PyObject* PyMember_GetOne(const char *obj_addr, struct PyMemberDef *m)
Get an attribute belonging to the object at address *obj_addr*. The
attribute is described by ``PyMemberDef`` *m*. Returns ``NULL``
on error.
.. c:function:: int PyMember_SetOne(char *obj_addr, struct PyMemberDef *m, PyObject *o)
Set an attribute belonging to the object at address *obj_addr* to object *o*.
The attribute to set is described by ``PyMemberDef`` *m*. Returns ``0``
if successful and a negative value on failure.
.. c:type:: PyGetSetDef
Structure to define property-like access for a type. See also description of
Expand Down

0 comments on commit d382bde

Please sign in to comment.