Commit 0888ff17 authored by Vladimir Marangozov's avatar Vladimir Marangozov

Do not set a MemoryError exception over another MemoryError exception,

thus preserving the first one that has been raised.
parent 8ae9ce5e
......@@ -238,6 +238,10 @@ PyErr_BadArgument(void)
PyObject *
PyErr_NoMemory(void)
{
if (PyErr_ExceptionMatches(PyExc_MemoryError))
/* already current */
return NULL;
/* raise the pre-allocated instance if it still exists */
if (PyExc_MemoryErrorInst)
PyErr_SetObject(PyExc_MemoryError, PyExc_MemoryErrorInst);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment