Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mypyc] Fix incorrect borrowed flag for setdefault() primitive #12514

Merged
merged 1 commit into from Apr 4, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Apr 3, 2022

CPyDict_SetDefaultWithNone doesn't return a borrowed reference,
since it just calls CPyDict_SetDefault which doesn't return a
borrowed reference. Treating the value as borrowed can cause
memory leaks.

`CPyDict_SetDefaultWithNone` doesn't return a borrowed reference,
since it just calls `CPyDict_SetDefault` which doesn't return a
borrowed reference.
Copy link
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

Oops!

@97littleleaf11 97littleleaf11 merged commit ee0638f into master Apr 4, 2022
@97littleleaf11 97littleleaf11 deleted the mypyc-bad-borrowed branch April 4, 2022 03:34
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.

None yet

3 participants