[Python-checkins] CVS: python/dist/src/Python errors.c,2.51,2.52
Vladimir Marangozov
python-dev@python.org
Fri, 18 Aug 2000 11:01:09 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv1835
Modified Files:
errors.c
Log Message:
Do not set a MemoryError exception over another MemoryError exception,
thus preserving the first one that has been raised.
Index: errors.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v
retrieving revision 2.51
retrieving revision 2.52
diff -C2 -r2.51 -r2.52
*** errors.c 2000/08/07 19:18:27 2.51
--- errors.c 2000/08/18 18:01:06 2.52
***************
*** 239,242 ****
--- 239,246 ----
PyErr_NoMemory(void)
{
+ if (PyErr_ExceptionMatches(PyExc_MemoryError))
+ /* already current */
+ return NULL;
+
/* raise the pre-allocated instance if it still exists */
if (PyExc_MemoryErrorInst)