Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
This commit is contained in:
@@ -1027,6 +1027,8 @@ _PySys_Init(void)
|
||||
#endif
|
||||
|
||||
m = Py_InitModule3("sys", sys_methods, sys_doc);
|
||||
if (m == NULL)
|
||||
return NULL;
|
||||
sysdict = PyModule_GetDict(m);
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user