mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
643d59cbd6
commit
3cb8e54da0
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue