- Notifications
You must be signed in to change notification settings - Fork3.8k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good cleanups, thanks! 👍 🥳
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this 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
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:
|
Sorry, I guess the conflicts are in here because I merged that big warnings C PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍 🎉 thanks heaps
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.10
Py_Isfunctions 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.