Skip to content

[3.10] gh-98724: Fix Py_CLEAR() macro side effects (GH-99100) (GH-99288) - #99292

Closed
miss-islington wants to merge 1 commit into
python:3.10from
miss-islington:backport-1082890-3.10
Closed

[3.10] gh-98724: Fix Py_CLEAR() macro side effects (GH-99100) (GH-99288)#99292
miss-islington wants to merge 1 commit into
python:3.10from
miss-islington:backport-1082890-3.10

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

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 1082890)

Co-authored-by: Victor Stinner vstinner@python.org
(cherry picked from commit c03e05c)

…ythonGH-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 1082890)
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit c03e05c)

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
ContributorAuthor

Sorry, I can't merge this PR. Reason: 3 of 6 required status checks are expected..

@vstinnervstinner closed this Nov 9, 2022
@vstinner

Copy link
Copy Markdown
Member

I closed the backport for now.

@miss-islington
miss-islington deleted the backport-1082890-3.10 branch November 9, 2022 15:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@miss-islington@vstinner@bedevere-bot