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

C code cleanups + cdrom/overlay removal#3014

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 3 commits intopygame:mainfromStarbuck5:c-code-cleanups
Feb 11, 2022

Conversation

@Starbuck5
Copy link
Contributor

I was browsing the python mailing list, as you do, and I foundpost about the evolution of the C API and the limited ABI.

And Victor Stinner, the author, provided atool that could do some upgrades automatically.

So I ran that, picked out the changes I wanted (I didn't feel like putting the new in 3.10Py_Is functions in our compatibility layer).

The benefits of these changes are that it makes our code a bit more standard and modern.

While I was at it I finally removed the cdrom and overlay code that's been sitting 100% unused since 2.1 removed SDL1 compatibility.

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.

Good cleanups, thanks! 👍 🥳

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.

While on the topic of C-API cleanups, the linked library provides a compatibility header, would it be vendoring this header into pygame? I imagine it might be useful as more python 3.x releases roll in, we can make use of newer API quicker
Header here:https://github.com/pythoncapi/pythoncapi_compat/blob/main/pythoncapi_compat.h

@illume
Copy link
Member

That compatibility header fatally is flawed. Because reasons... (sorry I didn't have time to make this shorter/clearer).

For compatibility, we had that issue of forwards/backwards compat. If we have something making defines, and compiling with an old version of the library... then when someone uses a new library there is a symbol crash. So it's better to use a new symbol instead.

Example to try and make it clear:

  • pygame main compiled with SDL 2.0.2
  • user drops in SDL 2.0.20 -> crash! because we defined a symbol which was missing in 2.0.2.

@illume
Copy link
Member

Sorry, I guess the conflicts are in here because I merged that big warnings C PR.

Copy link
Member

@illumeillume left a comment

Choose a reason for hiding this comment

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

👍 🎉 thanks heaps

@illumeillume added overlaySubmodule: overlay Code quality/robustnessCode quality and resilience to changes labelsOct 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@illumeillumeillume approved these changes

+1 more reviewer

@ankith26ankith26ankith26 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

C codeInvolves changing C codecdrompygame.cdromCode quality/robustnessCode quality and resilience to changesoverlaySubmodule: overlay

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

3 participants

@Starbuck5@illume@ankith26

[8]ページ先頭

©2009-2025 Movatter.jp