commit | 108289085719db8b227d65ce945e806f91be8f80 | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Wed Nov 09 16:29:23 2022 +0100 |
committer | GitHub <noreply@github.com> | Wed Nov 09 16:29:23 2022 +0100 |
tree | 04f04fb56672370eacd705c0f5b09b6d031a487b | |
parent | cf5dbb47a2aab02f65c5b25ee1b4886e1b3dfd16 [diff] |
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)