Skip to content

Commit d93163d

Browse files
committed
put pygame.system back ?
1 parent cffb75d commit d93163d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src_c/static.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import_pygame_surface(void)
4949
{
5050
}
5151

52+
5253
void
5354
import_pygame_window(void)
5455
{
@@ -74,6 +75,7 @@ import_pygame_freetype(void)
7475
{
7576
}
7677

78+
7779
void
7880
import_pygame_bufferproxy(void)
7981
{
@@ -113,6 +115,8 @@ import_pygame_pixelarray(void)
113115
{
114116
}
115117

118+
119+
116120
PyMODINIT_FUNC
117121
PyInit_base(void);
118122
PyMODINIT_FUNC
@@ -228,24 +232,20 @@ load_submodule(const char *parent, PyObject *mod, const char *alias)
228232
{
229233
char fqn[1024];
230234
if (!mod) {
231-
snprintf(fqn, sizeof(fqn), "ERROR: PyInit_%s failed for %s.%s", alias,
232-
parent, alias);
235+
snprintf(fqn, sizeof(fqn), "ERROR: PyInit_%s failed for %s.%s", alias, parent, alias);
233236
puts(fqn);
234237
PyErr_Print();
235238
PyErr_Clear();
236239
}
237240
else {
238241
snprintf(fqn, sizeof(fqn), "%s.%s", parent, alias);
239-
puts(fqn);
240242
PyObject *modules = PyImport_GetModuleDict();
241243

242244
PyObject *pmod = PyDict_GetItemString(modules, parent);
243245
if (!pmod) {
244-
snprintf(fqn, sizeof(fqn), "ERROR: Parent %s not found for %s.%s",
245-
parent, parent, alias);
246+
snprintf(fqn, sizeof(fqn), "ERROR: Parent %s not found for %s.%s", parent, parent, alias);
246247
puts(fqn);
247-
}
248-
else {
248+
} else {
249249
PyDict_SetItemString(modules, fqn, mod);
250250
PyDict_SetItemString(PyModule_GetDict(mod), "__name__",
251251
PyUnicode_FromString(fqn));
@@ -261,7 +261,7 @@ load_submodule_mphase(const char *parent, PyObject *mdef, PyObject *spec,
261261
{
262262
char fqn[1024];
263263
snprintf(fqn, sizeof(fqn), "%s.%s", parent, alias);
264-
puts(fqn);
264+
265265
PyObject *modules = PyImport_GetModuleDict();
266266

267267
Py_DECREF(PyObject_GetAttrString(spec, "name"));
@@ -292,8 +292,6 @@ load_submodule_mphase(const char *parent, PyObject *mdef, PyObject *spec,
292292
static PyObject *
293293
mod_pygame_import_cython(PyObject *self, PyObject *spec)
294294
{
295-
#if 1 // PY_VERSION_HEX <= 0x030C0000
296-
297295
load_submodule_mphase("pygame._sdl2", PyInit_sdl2(), spec, "sdl2");
298296

299297
load_submodule_mphase("pygame._sdl2", PyInit_mixer(), spec, "mixer");
@@ -305,7 +303,7 @@ mod_pygame_import_cython(PyObject *self, PyObject *spec)
305303
#endif
306304
load_submodule_mphase("pygame._sdl2", PyInit_audio(), spec, "audio");
307305
load_submodule_mphase("pygame._sdl2", PyInit_video(), spec, "video");
308-
#endif
306+
309307
Py_RETURN_NONE;
310308
}
311309

@@ -371,12 +369,14 @@ PyInit_pygame_static()
371369
// base, event
372370
load_submodule("pygame", PyInit_pg_time(), "time");
373371

372+
374373
load_submodule("pygame", PyInit_transform(), "transform");
375374
load_submodule("pygame", PyInit_draw(), "draw");
376375

377376
load_submodule("pygame", PyInit_mask(), "mask");
378377
load_submodule("pygame", PyInit_mouse(), "mouse");
379378

379+
380380
load_submodule("pygame", PyInit_pg_mixer(), "mixer");
381381
load_submodule("pygame.mixer", PyInit_mixer_music(), "music");
382382

@@ -392,7 +392,7 @@ PyInit_pygame_static()
392392
// base, color, rect, bufferproxy, surflock, surface
393393
load_submodule("pygame", PyInit_gfxdraw(), "gfxdraw");
394394

395-
// load_submodule("pygame", PyInit_system(), "system");
395+
load_submodule("pygame", PyInit_system(), "system");
396396

397397
return PyModule_Create(&mod_pygame_static);
398398
}

0 commit comments

Comments
 (0)