cpython/Doc/whatsnew
Victor Stinner b11a384dc7
gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070)
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their arguments once. If an argument has side effects, these side
effects are no longer duplicated.

Use temporary variables to avoid duplicating side effects of macro
arguments. If available, use _Py_TYPEOF() to avoid type punning.
Otherwise, use memcpy() for the assignment to prevent a
miscompilation with strict aliasing caused by type punning.

Add _Py_TYPEOF() macro: __typeof__() on GCC and clang.

Add test_py_clear() and test_py_setref() unit tests to _testcapi.
2022-12-07 15:22:38 +01:00
..
2.0.rst gh-96959: Update more HTTP links (GH-97536) 2022-09-27 14:08:11 +03:00
2.1.rst gh-93851: Fix all broken links in Doc/ (GH-93853) 2022-06-21 20:55:18 +02:00
2.2.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
2.3.rst gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768) 2022-10-05 11:01:14 -07:00
2.4.rst gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768) 2022-10-05 11:01:14 -07:00
2.5.rst gh-93738: Disallow pre-v3 syntax in the C domain (#97962) 2022-10-06 10:11:37 -07:00
2.6.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
2.7.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.0.rst Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) 2022-07-05 11:16:10 +02:00
3.1.rst gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961) 2022-09-24 14:38:53 +03:00
3.2.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.3.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.4.rst gh-96959: Update more HTTP links (GH-97536) 2022-09-27 14:08:11 +03:00
3.5.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.6.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
3.7.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.8.rst docs: Change links to label refs (#98454) 2022-10-25 20:26:28 -07:00
3.9.rst Docs: Fix backtick errors found by sphinx-lint (#97998) 2022-10-06 18:01:30 -07:00
3.10.rst whatsnew-3.10: Mention PEP 647 in the Release highlights section. (#99853) 2022-11-29 20:30:58 +00:00
3.11.rst gh-100008: Document Python build requirements (#100009) 2022-12-05 15:41:44 +01:00
3.12.rst gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070) 2022-12-07 15:22:38 +01:00
changelog.rst Include additional changes to support blurbified NEWS (#3340) 2017-09-05 00:46:18 -07:00
index.rst Fix What's New for 3.12 (GH-92482) 2022-05-08 18:23:08 +03:00