Message338232
When we define some members with PyMemberDef, we have to specify the flag for read-write or read-only.
static PyMemberDef members[] = {
{"name", T_OBJECT, offsetof(MyObject, name), 0, "Name object"},
{NULL} // Sentinel
};
For a newcomer, when you read the doc, you don't know the meaning of `0` and you want to know, of course you read the code and sometimes you can find READONLY or `0`.
I would like to add a new constant for `0` and name it `READWRITE`.
static PyMemberDef members[] = {
{"name", T_OBJECT, offsetof(MyObject, name), READWRITE, "Name object"},
{NULL} // Sentinel
}; |
|
| Date |
User |
Action |
Args |
| 2019-03-18 14:42:30 | matrixise | set | recipients:
+ matrixise |
| 2019-03-18 14:42:30 | matrixise | set | messageid: <1552920150.75.0.888906424388.issue36347@roundup.psfhosted.org> |
| 2019-03-18 14:42:30 | matrixise | link | issue36347 messages |
| 2019-03-18 14:42:30 | matrixise | create | |
|