X Tutup
Skip to content

bpo-30615: Fix the leak reference in Modules/_elementtree.c#2129

Merged
vstinner merged 1 commit intopython:2.7from
matrixise:bpo-30615
Jun 12, 2017
Merged

bpo-30615: Fix the leak reference in Modules/_elementtree.c#2129
vstinner merged 1 commit intopython:2.7from
matrixise:bpo-30615

Conversation

@matrixise
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

This change it wrong: don't call Py_ReprLeave() is status > 0.

@matrixise
Copy link
Copy Markdown
Member Author

that's the reason of my request for the review, I wanted to know if we need to call Py_ReprLeave when status > 0, or only if status == -1

@vstinner
Copy link
Copy Markdown
Member

There is https://docs.python.org/dev/c-api/exceptions.html#c.Py_ReprEnter doc, it may help.

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.

Py_ReprLeave() must only be called if Py_ReprEnter() succeeded: status == 0.

@vstinner vstinner merged commit 41af942 into python:2.7 Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup