diff Modules/parsermodule.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 f7474d31ba3f
children
line wrap: on
line diff
--- a/Modules/parsermodule.c	Wed Sep 27 19:04:53 2006 +0000
+++ b/Modules/parsermodule.c	Wed Sep 27 19:17:32 2006 +0000
@@ -3106,6 +3106,8 @@
 
     PyST_Type.ob_type = &PyType_Type;
     module = Py_InitModule("parser", parser_functions);
+    if (module == NULL)
+    	return;
 
     if (parser_error == 0)
         parser_error = PyErr_NewException("parser.ParserError", NULL, NULL);