summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst')
-rw-r--r--Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst b/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst
index e3ee6dc..092d457 100644
--- a/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst
+++ b/Misc/NEWS.d/next/C API/2020-05-06-23-54-57.bpo-30459.N9_Jai.rst
@@ -1,2 +1,6 @@
-Cast the result of :c:func:`PyList_SET_ITEM` and :c:func:`PyTuple_SET_ITEM`
-to void.
+: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.