Author vstinner
Recipients vstinner
Date 2020-06-22.14:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:13vstinnersetrecipients: + vstinner
2020-06-22 14:50:13vstinnersetmessageid: <>
2020-06-22 14:50:13vstinnerlinkissue41078 messages
2020-06-22 14:50:13vstinnercreate