gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#… · python/cpython@cd11ff1 · GitHub
Skip to content

Commit cd11ff1

Browse files
authored
gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#119619)
1 parent 86d1a1a commit cd11ff1

12 files changed

Lines changed: 140 additions & 142 deletions

File tree

Modules/_decimal/_decimal.c

Lines changed: 2 additions & 2 deletions

Modules/_json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj)
13261326
{
13271327
/* Return the JSON representation of a PyFloat. */
13281328
double i = PyFloat_AS_DOUBLE(obj);
1329-
if (!Py_IS_FINITE(i)) {
1329+
if (!isfinite(i)) {
13301330
if (!s->allow_nan) {
13311331
PyErr_Format(
13321332
PyExc_ValueError,

Modules/cmathmodule.c

Lines changed: 35 additions & 37 deletions

0 commit comments

Comments
 (0)