summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-12-07 10:56:20 (GMT)
committerGitHub <noreply@github.com>2020-12-07 10:56:20 (GMT)
commit0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3 (patch)
treeb7f921c6b76994932e2845ceff1853a6149f4fb3 /Doc
parentc266736ec1f9ebef38b134ceb4832df015711b38 (diff)
downloadcpython-0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3.zip
cpython-0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3.tar.gz
cpython-0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3.tar.bz2
bpo-30459: Cast the result of PyCell_SET to void (GH-23654)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.10.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 019dd18..a5cb4e3 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -611,6 +611,13 @@ Porting to Python 3.10
:ref:`Python Path Configuration. <init-path-config>`.
(Contributed by Victor Stinner in :issue:`42260`.)
+* :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.
+ (Contributed by Zackery Spytz and Victor Stinner in :issue:`30459`.)
+
Deprecated
----------