diff options
| author | arcadia-devtools <[email protected]> | 2022-06-09 19:02:01 +0300 |
|---|---|---|
| committer | arcadia-devtools <[email protected]> | 2022-06-09 19:02:01 +0300 |
| commit | 4a29d649866ff133e0b8f8a1009e1000a44d7279 (patch) | |
| tree | 547229aded91b3760628c646a144af604f1c3e2b /contrib/tools/python3/src/Include | |
| parent | 782f2445a283aed9a66e699137b3349af1689c29 (diff) | |
intermediate changes
ref:478170c7a5a1c0788ddd0d6513ce4ed86d7d7c99
Diffstat (limited to 'contrib/tools/python3/src/Include')
| -rw-r--r-- | contrib/tools/python3/src/Include/internal/pycore_hamt.h | 14 | ||||
| -rw-r--r-- | contrib/tools/python3/src/Include/patchlevel.h | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/contrib/tools/python3/src/Include/internal/pycore_hamt.h b/contrib/tools/python3/src/Include/internal/pycore_hamt.h index aaf65590955..357d9661627 100644 --- a/contrib/tools/python3/src/Include/internal/pycore_hamt.h +++ b/contrib/tools/python3/src/Include/internal/pycore_hamt.h @@ -5,7 +5,19 @@ # error "this header requires Py_BUILD_CORE define" #endif -#define _Py_HAMT_MAX_TREE_DEPTH 7 + +/* +HAMT tree is shaped by hashes of keys. Every group of 5 bits of a hash denotes +the exact position of the key in one level of the tree. Since we're using +32 bit hashes, we can have at most 7 such levels. Although if there are +two distinct keys with equal hashes, they will have to occupy the same +cell in the 7th level of the tree -- so we'd put them in a "collision" node. +Which brings the total possible tree depth to 8. Read more about the actual +layout of the HAMT tree in `hamt.c`. + +This constant is used to define a datastucture for storing iteration state. +*/ +#define _Py_HAMT_MAX_TREE_DEPTH 8 #define PyHamt_Check(o) Py_IS_TYPE(o, &_PyHamt_Type) diff --git a/contrib/tools/python3/src/Include/patchlevel.h b/contrib/tools/python3/src/Include/patchlevel.h index 482069c791a..2d30d350da8 100644 --- a/contrib/tools/python3/src/Include/patchlevel.h +++ b/contrib/tools/python3/src/Include/patchlevel.h @@ -18,12 +18,12 @@ /*--start constants--*/ #define PY_MAJOR_VERSION 3 #define PY_MINOR_VERSION 10 -#define PY_MICRO_VERSION 4 +#define PY_MICRO_VERSION 5 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.10.4" +#define PY_VERSION "3.10.5" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. |
