diff options
author | Guido van Rossum <guido@python.org> | 2002-08-11 14:06:15 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-08-11 14:06:15 +0000 |
commit | 3cb8e54da0a3fddd4841ecdbc6a7a79798fcbacd (patch) | |
tree | bc4389e9881be57deb3c50f2b2a923b6ca9208a3 /Python/compile.c | |
parent | 643d59cbd6f86516b083b958d76750b3626da3d6 (diff) | |
download | cpython-git-3cb8e54da0a3fddd4841ecdbc6a7a79798fcbacd.tar.gz |
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.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index e547e03b26..dbff9b03ae 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1162,6 +1162,7 @@ parsenumber(struct compiling *co, char *s) "will return positive values " "in Python 2.4 and up") < 0) return NULL; + errno = 0; /* Might be changed by PyErr_Warn() */ } } else |