]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29882: Add _Py_popcount32() function (GH-20518)
authorVictor Stinner <vstinner@python.org>
Mon, 8 Jun 2020 14:30:33 +0000 (16:30 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Jun 2020 14:30:33 +0000 (16:30 +0200)
commitc6b292cdeee689f0bfac6c1e2c2d4e4e01fa8d9e
tree4a7686465f3ed4a171382d4717ad558d82413951
parent301f0d4ff9b6bd60599eea0612904f65a92e6dd9
bpo-29882: Add _Py_popcount32() function (GH-20518)

* Rename pycore_byteswap.h to pycore_bitutils.h.
* Move popcount_digit() to pycore_bitutils.h as _Py_popcount32().
* _Py_popcount32() uses GCC and clang builtin function if available.
* Add unit tests to _Py_popcount32().
Include/internal/pycore_bitutils.h [moved from Include/internal/pycore_byteswap.h with 59% similarity]
Makefile.pre.in
Modules/_ctypes/cfield.c
Modules/_testinternalcapi.c
Modules/sha256module.c
Modules/sha512module.c
Objects/longobject.c
Objects/stringlib/codecs.h
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/hamt.c