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-133342: Removesym_is_const andsym_has_type#133884

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
tomasr8 wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromtomasr8:uop-simplifications

Conversation

tomasr8
Copy link
Member

@tomasr8tomasr8 commentedMay 11, 2025
edited by bedevere-appbot
Loading

  • Simplify patterns such as
if (sym_is_const(ctx,flag)) {PyObject*value=sym_get_const(ctx,flag);// use value}

into

PyObject*value=sym_get_const(ctx,flag);if (value) {// use value}
  • Removesym_is_const andsym_has_type. They can be replaced bysym_get_const andsym_get_type respectively. This part is more of an exploration, these functions might still be useful in some situations. If we do decide to keep them, we can still simplify them quite a bit.

Check out the issue for more context!

@Fidget-Spinner
Copy link
Member

LGTM. But let's wait for#132733 to merge, then your diff can be smaller as half of the manual constants will be gone :).

tomasr8 reacted with thumbs up emoji

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

@Fidget-SpinnerFidget-SpinnerAwaiting requested review from Fidget-SpinnerFidget-Spinner is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@brandtbucherbrandtbucherAwaiting requested review from brandtbucher

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@tomasr8@Fidget-Spinner

[8]ページ先頭

©2009-2025 Movatter.jp