Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

gh-105927: PyWeakref_GetRef() returns 1 on success#106561

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:weakref_getref_success
Jul 9, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedJul 9, 2023
edited by github-actionsbot
Loading

PyWeakref_GetRef() now returns 1 on success, and return 0 if the reference is dead.


📚 Documentation preview 📚:https://cpython-previews--106561.org.readthedocs.build/

PyWeakref_GetRef() now returns 1 on success, and return 0 if thereference is dead.
@vstinner
Copy link
MemberAuthor

PR to update the newly added C API to respect the new C API guidelines:https://devguide.python.org/developer-workflow/c-api/index.html

APIs with lesser and greater results must return 0 for the lesser result, and 1 for the greater result. Consider a lookup function with a three-way return: (...)

cc@erlend-aasland

@vstinner
Copy link
MemberAuthor

cc@encukou

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@vstinnervstinnerenabled auto-merge (squash)July 9, 2023 15:29
@vstinner
Copy link
MemberAuthor

Thanks for the review@serhiy-storchaka.

@vstinnervstinner merged commitee46cb6 intopython:mainJul 9, 2023
@vstinnervstinner deleted the weakref_getref_success branchJuly 9, 2023 16:10
@vstinner
Copy link
MemberAuthor

I updated pythoncapi-compat:python/pythoncapi-compat@d000b55

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp