Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 8, 2021

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()

https://bugs.python.org/issue45412

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()
@vstinner vstinner merged commit 2f92e2a into python:main Oct 11, 2021
@vstinner vstinner deleted the math_inc branch October 11, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants