blob: 092d457855a41bab2ea048ffacb903741a90b63c (
plain)
1
2
3
4
5
6
|
:c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:`PyCell_SET`
macros can no longer be used as l-value or r-value. For example,
``x = PyList_SET_ITEM(a, b, c)`` and ``PyList_SET_ITEM(a, b, c) = x`` now fail
with a compiler error. It prevents bugs like
``if (PyList_SET_ITEM (a, b, c) < 0) ...`` test.
Patch by Zackery Spytz and Victor Stinner.
|