mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
err_ovf(): only raise OverflowError when OverflowWarning was raised.
This commit is contained in:
parent
31960db5a5
commit
0b13116a62
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ static int
|
|||
err_ovf(char *msg)
|
||||
{
|
||||
if (PyErr_Warn(PyExc_OverflowWarning, msg) < 0) {
|
||||
if (PyErr_ExceptionMatches(PyExc_OverflowWarning))
|
||||
PyErr_SetString(PyExc_OverflowError, msg);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue