Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 84793:fc718c177ee6
Issue #18520: Add a new PyStructSequence_InitType2() function, same than
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Mon, 22 Jul 2013 22:24:54 +0200 |
| parents | 276477d5a548 |
| children | d38348173c46 |
line wrap: on
line diff
--- a/Python/pythonrun.c Mon Jul 22 13:08:21 2013 -0500 +++ b/Python/pythonrun.c Mon Jul 22 22:24:54 2013 +0200 @@ -328,7 +328,8 @@ if (!PyByteArray_Init()) Py_FatalError("Py_Initialize: can't init bytearray"); - _PyFloat_Init(); + if (!_PyFloat_Init()) + Py_FatalError("Py_Initialize: can't init float"); interp->modules = PyDict_New(); if (interp->modules == NULL)
