New submission from STINNER Victor <vstin...@python.org>:
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. ---------- components: C API messages: 372091 nosy: vstinner priority: normal severity: normal status: open title: [C API] Convert PyTuple_GET_ITEM() macro to a static inline function versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41078> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com