diff Python/compile.c @ 24739:eec6832818a3 legacy-trunk

Reset errno to zero after calling PyErr_Warn(). It can potentially do a lot of work, including I/O (e.g. to import warnings.py), which might affect errno.
author Guido van Rossum <guido@python.org>
date Sun, 11 Aug 2002 14:06:15 +0000
parents ff05eef3a6d1
children d75bd9e5c4d9
line wrap: on
line diff
--- a/Python/compile.c	Sun Aug 11 14:04:13 2002 +0000
+++ b/Python/compile.c	Sun Aug 11 14:06:15 2002 +0000
@@ -1162,6 +1162,7 @@
 				       "will return positive values "
 				       "in Python 2.4 and up") < 0)
 				return NULL;
+			errno = 0; /* Might be changed by PyErr_Warn() */
 		}
 	}
 	else