]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix a compiler warning in _randommodule.c (#141058)
authorVictor Stinner <vstinner@python.org>
Wed, 5 Nov 2025 18:00:32 +0000 (19:00 +0100)
committerGitHub <noreply@github.com>
Wed, 5 Nov 2025 18:00:32 +0000 (18:00 +0000)
commit4ac16dd10950fad2d3e58e8b0ba5f2e621af3cc1
treede83b31fa122135fecd8097900513e29b930b9a1
parent8d55faf2d68bbb6486a3e4509e8912d211748756
Fix a compiler warning in _randommodule.c (#141058)

The test just before the cast ensures that the cast cannot overflow.

Fix the warning on 32-bit Windows:

    Modules\_randommodule.c(525,28): warning C4244: '=': conversion
    from 'uint64_t' to 'Py_ssize_t', possible loss of data
Modules/_randommodule.c