We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36dd0fe commit 9d61f7aCopy full SHA for 9d61f7a
1 file changed
Programs/_testembed.c
@@ -2443,13 +2443,8 @@ PyInit_sp_pkg(void)
2443
return NULL;
2444
}
2445
// make this a namespace package
2446
- PyObject *path_list = PyList_New(0); // empty list = namespace package
2447
- if (!path_list) {
2448
- Py_DECREF(mod);
2449
- return NULL;
2450
- }
2451
- if (PyModule_AddObject(mod, "__path__", path_list) < 0) {
2452
- Py_DECREF(path_list);
+ // empty list = namespace package
+ if (PyModule_Add(mod, "__path__", PyList_New(0)) < 0) {
2453
Py_DECREF(mod);
2454
2455
0 commit comments