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-135755: Document the newPyFunction_GET_BUILTINS macro#135934

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

Open
ZeroIntensity wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromZeroIntensity:document-get-builtins

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensityZeroIntensity commentedJun 25, 2025
edited by github-actionsbot
Loading

Comment on lines +150 to +152
This function cannot fail and does not do error checking; passing anything
other than an instance of :c:data:`PyFunction_Type` is undefined behavior.
There is no ``PyFunction_Get*`` equivalent for this function.
Copy link
Member

Choose a reason for hiding this comment

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

Hm, I don't think C API WG would approve.
Should this function be in a private header (and with an underscore) instead? It looks untested as well.

ericsnowcurrently reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It'ssort of tested. I'm not opposed to making it private.

Copy link
Member

Choose a reason for hiding this comment

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

That looks like it's used in a test -- the test assumes that it's working?
Yeah, the more I look into it, the better making it private seems.

cc@ericsnowcurrently, who addedPyFunction_GET_BUILTINS in#133128

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'll put up an alternate PR.

Choose a reason for hiding this comment

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

FWIW, I agree with making it internal-only.

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

@encukouencukouencukou left review comments

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently left review comments

Assignees
No one assigned
Labels
awaiting core reviewdocsDocumentation in the Doc dirneeds backport to 3.14bugs and security fixesskip newstopic-C-API
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ZeroIntensity@encukou@ericsnowcurrently

[8]ページ先頭

©2009-2025 Movatter.jp