Skip to content

Commit

Permalink
pythongh-108765: Python.h no longer includes <ieeefp.h>
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 1, 2023
1 parent 0e01fac commit 364a59d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,11 @@ New Features
Porting to Python 3.13
----------------------

* ``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
included for the ``finite()`` function which is now provided by the
``<math.h>`` header. It should now be included explicitly if needed.
(Contributed by Victor Stinner in :gh:`108765`.)

Deprecated
----------

Expand Down
1 change: 1 addition & 0 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#endif

#include <assert.h> // assert()
#include <math.h> // HUGE_VAL
#include <wchar.h> // wchar_t

#include "pyport.h"
Expand Down
6 changes: 0 additions & 6 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,6 @@ typedef Py_ssize_t Py_ssize_clean_t;
# define Py_MEMCPY memcpy
#endif

#ifdef HAVE_IEEEFP_H
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
#endif

#include <math.h> /* Moved here from the math section, before extern "C" */

/********************************************
* WRAPPER FOR <time.h> and/or <sys/time.h> *
********************************************/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
included for the ``finite()`` function which is now provided by the
``<math.h>`` header. It should now be included explicitly if needed. Patch
by Victor Stinner.

0 comments on commit 364a59d

Please sign in to comment.