File tree 2 files changed +16
-17
lines changed
2 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -17,23 +17,6 @@ extern Py_hash_t _Py_HashPointerRaw(const void*);
17
17
// Export for '_datetime' shared extension
18
18
PyAPI_FUNC (Py_hash_t ) _Py_HashBytes (const void * , Py_ssize_t );
19
19
20
- /* Prime multiplier used in string and various other hashes. */
21
- #define _PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */
22
-
23
- /* Parameters used for the numeric hash implementation. See notes for
24
- _Py_HashDouble in Python/pyhash.c. Numeric hashes are based on
25
- reduction modulo the prime 2**_PyHASH_BITS - 1. */
26
-
27
- #if SIZEOF_VOID_P >= 8
28
- # define _PyHASH_BITS 61
29
- #else
30
- # define _PyHASH_BITS 31
31
- #endif
32
-
33
- #define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
34
- #define _PyHASH_INF 314159
35
- #define _PyHASH_IMAG _PyHASH_MULTIPLIER
36
-
37
20
/* Hash secret
38
21
*
39
22
* memory layout on 64 bit systems
Original file line number Diff line number Diff line change @@ -16,6 +16,22 @@ typedef struct {
16
16
PyAPI_FUNC (PyHash_FuncDef * ) PyHash_GetFuncDef (void );
17
17
#endif
18
18
19
+ /* Prime multiplier used in string and various other hashes. */
20
+ #define _PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */
21
+
22
+ /* Parameters used for the numeric hash implementation. See notes for
23
+ _Py_HashDouble in Python/pyhash.c. Numeric hashes are based on
24
+ reduction modulo the prime 2**_PyHASH_BITS - 1. */
25
+
26
+ #if SIZEOF_VOID_P >= 8
27
+ # define _PyHASH_BITS 61
28
+ #else
29
+ # define _PyHASH_BITS 31
30
+ #endif
31
+
32
+ #define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
33
+ #define _PyHASH_INF 314159
34
+ #define _PyHASH_IMAG _PyHASH_MULTIPLIER
19
35
20
36
/* Cutoff for small string DJBX33A optimization in range [1, cutoff).
21
37
*
You can’t perform that action at this time.
0 commit comments