-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
gh-127443: Add semantics for stolen references in Doc/data/refcounts.dat
#127468
base: main
Are you sure you want to change the base?
Conversation
Some functions that steal references but are not yet included/fixed (waiting for other PRs):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will say, there are some functions that do truly steal a reference by DECREF
ing the input. For example, PyModule_AddObject
--do we want to treat that with $
, or with -1
?
If they |
I'll let you decide :) |
On success, However, on error it does not steal a reference -- it does failed |
Would it make sense to prefix existing comments with |
For now, it only changes the entry that are know to be stealing references. I'd like to have some help here: if you know which functions steals references, just drop the name and I'll update the PR (it's hard for me to find them automatically...).
This PR should be merged after #127451 and probably before #127443 so that I can use the new symbol and don't need to update the comment.
Doc/data/refcounts.dat
#127443📚 Documentation preview 📚: https://cpython-previews--127468.org.readthedocs.build/