SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

gh-98724: Fix Py_CLEAR() macro side effects (#99100)

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.
V
Victor Stinner committed
c03e05c2e72f3ea5e797389e7d1042eef85ad37a
Parent: 0124b5d
Committed by GitHub <[email protected]> on 11/9/2022, 1:06:36 PM