KEMBAR78
[mypyc] Fix incorrect borrowed flag for setdefault() primitive by JukkaL · Pull Request #12514 · python/mypy · GitHub
Skip to content

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.

3 participants