mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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().
This commit is contained in:
parent
301f0d4ff9
commit
c6b292cdee
11 changed files with 108 additions and 39 deletions
|
@ -4,7 +4,7 @@
|
|||
# error "codecs.h is specific to Unicode"
|
||||
#endif
|
||||
|
||||
#include "pycore_byteswap.h" // _Py_bswap32()
|
||||
#include "pycore_bitutils.h" // _Py_bswap32()
|
||||
|
||||
/* Mask to quickly check whether a C 'long' contains a
|
||||
non-ASCII, UTF8-encoded char. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue