[issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode

STINNER Victor report at bugs.python.org
Thu Nov 29 05:57:55 EST 2018


STINNER Victor <vstinner at redhat.com> added the comment:

> This is compatibility breaking change.

Right. The question is if you are ok with it :-)

> Currently you can get the address of the array of tuple items by using &PyTuple_GET_ITEM(obj, 0).

I don't get your point. I know that you access directly obj->ob_item to use directly the C array rather than PyTuple_GET_ITEM/PyTuple_SET_ITEM, but the issue is about making PyTuple_GET_ITEM/PyTuple_SET_ITEM stricter in debug mode.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35337>
_______________________________________


More information about the Python-bugs-list mailing list