comparison Python/sysmodule.c @ 39893:6fb46e87d5f9 2.4

[Backport of rev. 42093 by neal.norwitz] Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
author Andrew M. Kuchling <amk@amk.ca>
date Wed, 27 Sep 2006 19:17:32 +0000
parents 11f66731554d
children ab13576374b1
comparison
equal deleted inserted replaced
39892:9347c2b451ba 39893:6fb46e87d5f9
942 #ifdef MS_WINDOWS 942 #ifdef MS_WINDOWS
943 char buf[13]; 943 char buf[13];
944 #endif 944 #endif
945 945
946 m = Py_InitModule3("sys", sys_methods, sys_doc); 946 m = Py_InitModule3("sys", sys_methods, sys_doc);
947 if (m == NULL)
948 return NULL;
947 sysdict = PyModule_GetDict(m); 949 sysdict = PyModule_GetDict(m);
948 950
949 { 951 {
950 /* XXX: does this work on Win/Win64? (see posix_fstat) */ 952 /* XXX: does this work on Win/Win64? (see posix_fstat) */
951 struct stat sb; 953 struct stat sb;