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-118771: Ensure names defined in optimizer.h start with Py/_Py#118825

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
encukou merged 4 commits intopython:mainfromencukou:private
May 10, 2024

Conversation

@encukou
Copy link
Member

@encukouencukou commentedMay 9, 2024
edited by bedevere-appbot
Loading

optimizer.h is included fromPython.h, and defines some names that can clash with user code. They should be hidden or get thePy/_Py prefix.

This PR:

  • removes unused struct tags from typedefs:
    • struct _bloom_filter
    • struct _exit_data
  • prefixes the remaining names with_Py_:
    • uop_get_target
    • uop_get_exit_index
    • uop_get_jump_target
    • uop_get_error_target
    • optimize_func typedef
    • BLOOM_FILTER_WORDS
    • UOP_FORMAT_TARGET
    • UOP_FORMAT_EXIT
    • UOP_FORMAT_JUMP
    • UOP_FORMAT_UNUSED

Perhaps some of these should be in a private header instead?
Or perhaps some should be public?
@markshannon, could you clarify the intent here?

@gvanrossum
Copy link
Member

I'll leave this for@markshannon to review.

@brandtbucher
Copy link
Member

brandtbucher commentedMay 9, 2024
edited
Loading

I personally don't think we should be exposing this much of the micro-op format. Can they just be moved topycore_optimizer.h? I forget if the same naming rules apply there.

@markshannon
Copy link
Member

Yes, let's move as much as we can topycore_optimizer.h

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

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

@encukou Thanks for tidying that up

encukou reacted with thumbs up emoji
@encukouencukou merged commit941eea0 intopython:mainMay 10, 2024
@encukouencukou deleted the private branchMay 10, 2024 16:20
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@markshannonmarkshannonmarkshannon approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@encukou@gvanrossum@brandtbucher@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp