]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 17 Jul 2024 07:58:25 +0000 (10:58 +0300)
committerGitHub <noreply@github.com>
Wed, 17 Jul 2024 07:58:25 +0000 (07:58 +0000)
commit874eed6cfe165df6469bf806cd3f1eb08e432286
tree0eb3de6ce05ffc664cce9c939ceced2383bae83d
parent6a19d22a190be2a2ccdde3a273bc319b6acdf1f2
[3.12] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)

* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signed integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
(cherry picked from commit 1801545)
Objects/longobject.c
Python/bltinmodule.c