mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
merge 3.2
This commit is contained in:
commit
7d74b70e51
|
@ -745,13 +745,13 @@ math_1_to_whatever(PyObject *arg, double (*func) (double),
|
|||
return NULL;
|
||||
}
|
||||
if (Py_IS_INFINITY(r) && Py_IS_FINITE(x)) {
|
||||
if (can_overflow)
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"math range error"); /* overflow */
|
||||
else
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"math domain error"); /* singularity */
|
||||
return NULL;
|
||||
if (can_overflow)
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"math range error"); /* overflow */
|
||||
else
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"math domain error"); /* singularity */
|
||||
return NULL;
|
||||
}
|
||||
if (Py_IS_FINITE(r) && errno && is_error(r))
|
||||
/* this branch unnecessary on most platforms */
|
||||
|
|
Loading…
Reference in a new issue