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

Fix and normalize function pointer calls for METH_NOARGS#3080

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
ankith26 merged 1 commit intopygame:mainfrompmp-p:pygame-fix-fpc
Mar 25, 2022

Conversation

@pmp-p
Copy link
Contributor

@pmp-ppmp-p commentedMar 15, 2022
edited
Loading

once done i will be able to add fixes to support better Limited API and full wasm support which must be reviewed more carefully than this one.

As the current changes proposed where made guided by a checker (https://gist.github.com/pmp-p/5641b7edfffba457d3eed875454ab5ca)

concerns#718

@dr0id
Copy link
Contributor

Thanks for the PR and trying to make pygame better.

The only long-term solution I see is to use some checker script in the CI builds. Otherwise those errors will creep in again.

ankith26 reacted with thumbs up emoji

@Starbuck5
Copy link
Contributor

Starbuck5 commentedMar 17, 2022
edited
Loading

The only long-term solution I see is to use some checker script in the CI builds. Otherwise those errors will creep in again.

I'm 100% spitballing here, but what if one of pygame's base header files undefined or invalidated the actual things you would use to cast functions, forcing people to write the functions without casts.

Also, please correct me if I'm wrong, but shouldn't the (PyCFunction) casts be removed now? Things like this:https://github.com/pygame/pygame/blob/main/src_c/math.c#L3292-L3295. This PR doesn't remove function pointer casting fully, just makes it an easier cast for Webassembly?

@pmp-p
Copy link
ContributorAuthor

This PR doesn't remove function pointer casting fully, just makes it an easier cast for Webassembly

indeed, it just try to fix what is completely illegal in web assembly, trying to leave existing code as possible untouched.

Starbuck5 reacted with thumbs up emoji

Copy link
Contributor

@Starbuck5Starbuck5 left a comment

Choose a reason for hiding this comment

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

Let's do it!

Thanks for working on this pmp-p!

The funny thing is that this actually might be a code quality enhancement, since it gives a consistent way to express the PyObject in the slot isn't and shouldn't actually be used.

Copy link
Contributor

@ankith26ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the PR 👍 😄

As mentioned above, it might be a good idea to automate testing this on CI somehow, but apart from that, this PR is nice and it makes things more consistent!

PS: The Ubuntu fail on this PR is unrelated to this issue, it should already be fixed onmain branch

@illumeillume changed the titlefix/norm function pointer calls for METH_NOARGSFix and normalize function pointer calls for METH_NOARGSOct 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@Starbuck5Starbuck5Starbuck5 approved these changes

@ankith26ankith26ankith26 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

5 participants

@pmp-p@dr0id@Starbuck5@ankith26@illume

[8]ページ先頭

©2009-2025 Movatter.jp