-
-
Notifications
You must be signed in to change notification settings - Fork 201
Base header #3486
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
Base header #3486
Conversation
You could also do in #include "base.c"
[...] But that'll make building tests messy... |
Absolutely not That begs for linker problems that would be a pain to solve, and ultimately, having a header with all the declarations is just cleaner IMO. Including a source file is just plain nasty |
…g externally for potential unit tests
…future unit test purposes
…into base-header
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.
there are problems that could be solved i thing by simply merging static and base ( ie when wasm loading pygame_base static could be set to pygame.base by pygame/__init__.py
Co-authored-by: pmp-p <[email protected]>
last commit won't do it : wasm at runtime says that pgExc_SDLError needs to be globally exported for dynamic loading. |
That PR (minus last commit) would unlock further work on meson wasm build. it is already viable for non cython files( _sdl2 ) |
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.
mixer.c should only use MODINIT_DEFINE(mixer)
Line 2052 in 2036f44
#if BUILD_STATIC |
because now sdl2 mixer init has been renamed
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.
I am approving all the non-wasm/non-static changes of this PR, I trust pmp-p has reviewed the wasm/static specific bits.
Another precursor PR to #3477
The reason I want to remove so much static linkage is because you can't test functions that aren't visible to you (not even worth putting those declarations in the header, since anyone that includes the header would need to provide their own implementation to call them).