Mercurial > cpython-lru_cache-weakref
diff Modules/cStringIO.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 | accfb156f9cc |
| children | 0565130d7d9f |
line wrap: on
line diff
--- a/Modules/cStringIO.c Wed Sep 27 19:04:53 2006 +0000 +++ b/Modules/cStringIO.c Wed Sep 27 19:17:32 2006 +0000 @@ -718,6 +718,7 @@ m = Py_InitModule4("cStringIO", IO_methods, cStringIO_module_documentation, (PyObject*)NULL,PYTHON_API_VERSION); + if (m == NULL) return; /* Add some symbolic constants to the module */ d = PyModule_GetDict(m);
