-
-
Notifications
You must be signed in to change notification settings - Fork 185
Fix build with debug python #3345
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For anyone too impatient to wait for the CI to be finished, here's the patch (in a zip because github doesn't like the raw patch file lol) |
b7e4fb7
to
b9cb297
Compare
…re messy macros and weird shim. Just manual caching where needed in pgSurface_UnlockBy
67def9f
to
381d8f6
Compare
src_c/include/_pygame.h
Outdated
|
||
#if PY_VERSION_HEX >= 0x030C0000 | ||
|
||
#define CREATE_CACHE_VARIABLES static PyObject *__cached_exception = NULL; |
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.
Can probably name this better lol, "cache variables" sounds misleading. Maybe DECLARE_EXC
, GET_EXC
and SET_EXC
?
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.
Names are hard lol
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.
Maybe DECLARE_EXCEPTION_CACHE
, CACHE_EXCEPTION
, RESTORE_EXCEPTION
? I'm not as big a fan of GET_EXC
and SET_EXC
because it's not as clear IMO what they're actually doing, and DECLARE_EXC
makes it sound like you're declaring an exception itself, not a cache to be used
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.
names do be hard 💀
IG my confusion is with the word "cache" because it's not really a cache, is it? I mean, IG we can have DECLARE_EXCEPTION_STORE
, STORE_EXCEPTION
and RESTORE_EXCEPTION
but I'm not too fond of these names either.
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.
It is a cache. It’s caching the current exception while we call API that would throw a fit if it was active
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.
Why they don't have the PG_
prefix?
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.
Renamed to something @ankith26 approved of on discrod
bdf292a
to
ea266f7
Compare
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.
LGTM, thanks for the 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.
LGTM 👍
Our build currently sucks when we use python with debug symbols. This at least gets us in a working spot. First commit is to baseline the CI and demo the problem. When that's done, I'll push the fix commit