]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)
authorVictor Stinner <vstinner@python.org>
Mon, 11 Oct 2021 19:00:25 +0000 (21:00 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Oct 2021 19:00:25 +0000 (21:00 +0200)
commit2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a
tree0eee8237edd81885e5e6c9e70686a0c84a44c2db
parent659812b451aefe1f0e5f83540296519a5fb8f313
bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)

Remove the following math macros using the errno variable:

* Py_ADJUST_ERANGE1()
* Py_ADJUST_ERANGE2()
* Py_OVERFLOWED()
* Py_SET_ERANGE_IF_OVERFLOW()
* Py_SET_ERRNO_ON_MATH_ERROR()

Create pycore_pymath.h internal header file.

Rename Py_ADJUST_ERANGE1() and Py_ADJUST_ERANGE2() to
_Py_ADJUST_ERANGE1() and _Py_ADJUST_ERANGE2(), and convert these
macros to static inline functions.

Move the following macros to pycore_pymath.h:

* _Py_IntegralTypeSigned()
* _Py_IntegralTypeMax()
* _Py_IntegralTypeMin()
* _Py_InIntegralTypeRange()
Doc/whatsnew/3.11.rst
Include/internal/pycore_pymath.h [new file with mode: 0644]
Include/pymath.h
Include/pyport.h
Misc/NEWS.d/next/C API/2021-10-08-15-54-07.bpo-45412.KHyJCT.rst [new file with mode: 0644]
Objects/complexobject.c
Objects/floatobject.c
Python/pytime.c