diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-22 22:24:54 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-22 22:24:54 +0200 |
commit | 92d3e3cf6bfe7320aea27780a6525e6075624935 (patch) | |
tree | dc99d26f5917c50df3eef98d5210f3e48f8b9749 /Python/pythonrun.c | |
parent | 81be11b7102a19889c2a018cfac5c656301d00e1 (diff) | |
download | cpython-92d3e3cf6bfe7320aea27780a6525e6075624935.tar.gz |
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
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 040172bb3d..edf9b6b542 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -328,7 +328,8 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib) 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) |