]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
chore: decimal module macro cleanup (#123791)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 9 Sep 2024 09:24:24 +0000 (11:24 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 09:24:24 +0000 (11:24 +0200)
commit05a401a5c3e385286a346df6f0b463b35df871b2
tree962112feb1f74fa677d6259f795dc0435ebf2ed0
parent93b61bc1245fb318a11d3d1a0808174b3c1bc333
chore: decimal module macro cleanup (#123791)

* protect macros expansion via `do { ... } while (0)` constructions in `_decimal.c`

* Use public macro `Py_UNUSED`

This replaces the usages of the `UNUSED` macro which
was not consistent with the `Py_UNUSED` macro itself.

In addition, this amends the parameter names so that
they match their semantic meanings.

* Remove redundant `PyCFunction` casts
Modules/_decimal/_decimal.c