1111#define PYGAMEAPI_WINDOW_INTERNAL
1212#define PYGAMEAPI_RENDER_INTERNAL
1313
14+ #if 0
1415#define pgSurface_New (surface ) (pgSurfaceObject *)pgSurface_New2((surface), 1)
1516#define pgSurface_NewNoOwn (surface ) \
1617 (pgSurfaceObject *)pgSurface_New2((surface), 0)
18+ #endif
1719
1820#include "pygame.h"
1921#include "Python.h"
@@ -49,6 +51,10 @@ import_pygame_surface(void)
4951{
5052}
5153
54+ #ifdef import_pygame_window
55+ #undef import_pygame_window
56+ #endif
57+
5258void
5359import_pygame_window (void )
5460{
@@ -89,6 +95,10 @@ import_pygame_event(void)
8995{
9096}
9197
98+ #ifdef import_pygame_joystick
99+ #undef import_pygame_joystick
100+ #endif
101+
92102void
93103import_pygame_joystick (void )
94104{
@@ -113,6 +123,8 @@ import_pygame_pixelarray(void)
113123{
114124}
115125
126+ PyMODINIT_FUNC
127+ PyInit_base (void );
116128PyMODINIT_FUNC
117129PyInit_color (void );
118130PyMODINIT_FUNC
@@ -322,6 +334,10 @@ PyInit_pygame_static()
322334 // for correct input in wasm worker
323335 SDL_SetHint ("SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" , "1" );
324336
337+ // base module is including current file
338+ // all globals are accessible from here.
339+ load_submodule ("pygame" , PyInit_base (), "base" );
340+
325341 load_submodule ("pygame" , PyInit_constants (), "constants" );
326342 //
327343 load_submodule ("pygame" , PyInit_pg_math (), "math" );
@@ -391,7 +407,7 @@ PyInit_pygame_static()
391407
392408#endif // defined(BUILD_STATIC)
393409
394- #include "base.h"
410+ // #include "base.h"
395411
396412#include "rect.c"
397413#include "pgcompat_rect.c"
0 commit comments