File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
29
29
30
30
.. versionadded :: 3.13
31
31
32
+ .. c :macro :: PyHASH_MULTIPLIER
33
+
34
+ Prime multiplier used in string and various other hashes.
35
+
36
+ .. versionadded :: 3.13
37
+
32
38
.. c :macro :: PyHASH_INF
33
39
34
40
The hash value returned for a positive infinity.
Original file line number Diff line number Diff line change 3
3
#endif
4
4
5
5
/* Prime multiplier used in string and various other hashes. */
6
- #define _PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */
6
+ #define PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */
7
7
8
8
/* Parameters used for the numeric hash implementation. See notes for
9
9
_Py_HashDouble in Python/pyhash.c. Numeric hashes are based on
17
17
18
18
#define PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
19
19
#define PyHASH_INF 314159
20
- #define PyHASH_IMAG _PyHASH_MULTIPLIER
20
+ #define PyHASH_IMAG PyHASH_MULTIPLIER
21
21
22
22
/* Aliases kept for backward compatibility with Python 3.12 */
23
23
#define _PyHASH_BITS PyHASH_BITS
Original file line number Diff line number Diff line change
1
+ Add :c:macro: `PyHASH_MULTIPLIER ` constant: prime multiplier used in string
2
+ and various other hashes. Patch by Victor Stinner.
You can’t perform that action at this time.
0 commit comments