Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
vstinner merged 1 commit into
python:2.7python/cpython:2.7from
matrixise:bpo-30615matrixise/cpython:bpo-30615Copy head branch name to clipboard
Jun 12, 2017
Merged

bpo-30615: Fix the leak reference in Modules/_elementtree.c#2129
vstinner merged 1 commit into
python:2.7python/cpython:2.7from
matrixise:bpo-30615matrixise/cpython:bpo-30615Copy head branch name to clipboard

Conversation

@matrixise

Copy link
Copy Markdown
Member

No description provided.

@vstinner vstinner 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.

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.

Comment thread Modules/_elementtree.c Outdated

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.