mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#119619)
This commit is contained in:
parent
86d1a1aa88
commit
cd11ff12ac
12 changed files with 140 additions and 142 deletions
|
|
@ -1326,7 +1326,7 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj)
|
|||
{
|
||||
/* Return the JSON representation of a PyFloat. */
|
||||
double i = PyFloat_AS_DOUBLE(obj);
|
||||
if (!Py_IS_FINITE(i)) {
|
||||
if (!isfinite(i)) {
|
||||
if (!s->allow_nan) {
|
||||
PyErr_Format(
|
||||
PyExc_ValueError,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue