diff Modules/arraymodule.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 adbfd8d5851c
children 5d93e5ccb31e
line wrap: on
line diff
--- a/Modules/arraymodule.c	Wed Sep 27 19:04:53 2006 +0000
+++ b/Modules/arraymodule.c	Wed Sep 27 19:17:32 2006 +0000
@@ -2096,6 +2096,8 @@
 	Arraytype.ob_type = &PyType_Type;
 	PyArrayIter_Type.ob_type = &PyType_Type;
 	m = Py_InitModule3("array", a_methods, module_doc);
+	if (m == NULL)
+		return;
 
         Py_INCREF((PyObject *)&Arraytype);
 	PyModule_AddObject(m, "ArrayType", (PyObject *)&Arraytype);