diff options
Diffstat (limited to 'Doc/c-api/structures.rst')
-rw-r--r-- | Doc/c-api/structures.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 20d5485..05c54cc 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -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 |