Message372091
PyTuple_GET_ITEM() can be abused to access directly the PyTupleObject.ob_item member:
PyObject **items = &PyTuple_GET_ITEM(0);
Giving a direct access to an array or PyObject* (PyObject**) is causing issues with other Python implementations, like PyPy, which don't use PyObject internally.
I propose to convert the PyTuple_GET_ITEM() and PyList_GET_ITEM() macros to static inline functions to disallow that. |
|
Date |
User |
Action |
Args |
2020-06-22 14:50:13 | vstinner | set | recipients:
+ vstinner |
2020-06-22 14:50:13 | vstinner | set | messageid: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org> |
2020-06-22 14:50:13 | vstinner | link | issue41078 messages |
2020-06-22 14:50:13 | vstinner | create | |
|