diff options
author | Victor Stinner <vstinner@python.org> | 2024-05-21 17:51:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 17:51:51 (GMT) |
commit | f6da790122fdae1a28f444edfbb55202d6829cd1 (patch) | |
tree | 68d3e65a10037dfc6421b70a2f24bbc06d68f285 /Include/cpython | |
parent | 87939bd5790accea77c5a81093f16f28d3f0b429 (diff) | |
download | cpython-f6da790122fdae1a28f444edfbb55202d6829cd1.zip cpython-f6da790122fdae1a28f444edfbb55202d6829cd1.tar.gz cpython-f6da790122fdae1a28f444edfbb55202d6829cd1.tar.bz2 |
gh-111389: Add PyHASH_MULTIPLIER constant (#119214)
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/pyhash.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Include/cpython/pyhash.h b/Include/cpython/pyhash.h index 2f8e12c..825c034 100644 --- a/Include/cpython/pyhash.h +++ b/Include/cpython/pyhash.h @@ -3,7 +3,7 @@ #endif /* Prime multiplier used in string and various other hashes. */ -#define _PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */ +#define PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */ /* Parameters used for the numeric hash implementation. See notes for _Py_HashDouble in Python/pyhash.c. Numeric hashes are based on @@ -17,9 +17,10 @@ #define PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1) #define PyHASH_INF 314159 -#define PyHASH_IMAG _PyHASH_MULTIPLIER +#define PyHASH_IMAG PyHASH_MULTIPLIER /* Aliases kept for backward compatibility with Python 3.12 */ +#define _PyHASH_MULTIPLIER PyHASH_MULTIPLIER #define _PyHASH_BITS PyHASH_BITS #define _PyHASH_MODULUS PyHASH_MODULUS #define _PyHASH_INF PyHASH_INF |