Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 36324:1af7f719ed28 legacy-trunk
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Thu, 19 Jan 2006 06:09:39 +0000 |
| parents | 9541369b0dca |
| children | 7fdc639bc5b4 |
line wrap: on
line diff
--- a/Modules/parsermodule.c Wed Jan 18 20:04:02 2006 +0000 +++ b/Modules/parsermodule.c Thu Jan 19 06:09:39 2006 +0000 @@ -3148,6 +3148,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);
