gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their argument once. If an argument has side effects, these side effects are no longer duplicated. Add test_py_clear() and test_py_setref() unit tests to _testcapi. (cherry picked from commit c03e05c2e72f3ea5e797389e7d1042eef85ad37a)
V
Victor Stinner committed
108289085719db8b227d65ce945e806f91be8f80
Parent: cf5dbb4
Committed by GitHub <noreply@github.com>
on 11/9/2022, 3:29:23 PM