Mercurial > cpython-lru_cache-weakref
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 84792:ffe9d73b5f8d | 84793:fc718c177ee6 |
|---|---|
| 326 Py_FatalError("Py_Initialize: can't init longs"); | 326 Py_FatalError("Py_Initialize: can't init longs"); |
| 327 | 327 |
| 328 if (!PyByteArray_Init()) | 328 if (!PyByteArray_Init()) |
| 329 Py_FatalError("Py_Initialize: can't init bytearray"); | 329 Py_FatalError("Py_Initialize: can't init bytearray"); |
| 330 | 330 |
| 331 _PyFloat_Init(); | 331 if (!_PyFloat_Init()) |
| 332 Py_FatalError("Py_Initialize: can't init float"); | |
| 332 | 333 |
| 333 interp->modules = PyDict_New(); | 334 interp->modules = PyDict_New(); |
| 334 if (interp->modules == NULL) | 335 if (interp->modules == NULL) |
| 335 Py_FatalError("Py_Initialize: can't make modules dictionary"); | 336 Py_FatalError("Py_Initialize: can't make modules dictionary"); |
| 336 | 337 |
