diff options
| author | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-08-18 18:01:06 +0000 | 
|---|---|---|
| committer | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-08-18 18:01:06 +0000 | 
| commit | 0888ff17bd745333dc61a0e4bb3afb399f007c3f (patch) | |
| tree | a1c85cc9b8e67658356860be9607259974b3f0db /Python | |
| parent | 8ae9ce5e5b40f0e2fc809a08dbbede5079c7b8e7 (diff) | |
| download | cpython-git-0888ff17bd745333dc61a0e4bb3afb399f007c3f.tar.gz | |
Do not set a MemoryError exception over another MemoryError exception,
thus preserving the first one that has been raised.
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/errors.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/errors.c b/Python/errors.c index a9e4daed9b..ffa7f82f34 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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);  | 
