We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dk_log2_index_bytes=3
1 parent c96ab19 commit d36498eCopy full SHA for d36498e
Objects/dictobject.c
@@ -449,11 +449,14 @@ estimate_log2_keysize(Py_ssize_t n)
449
450
/* This immutable, empty PyDictKeysObject is used for PyDict_Clear()
451
* (which cannot fail and thus can do no allocation).
452
+ *
453
+ * See https://github.com/python/cpython/pull/127568#discussion_r1868070614
454
+ * for the rationale of using dk_log2_index_bytes=3 instead of 0.
455
*/
456
static PyDictKeysObject empty_keys_struct = {
457
1, /* dk_refcnt */
458
0, /* dk_log2_size */
- 0, /* dk_log2_index_bytes */
459
+ 3, /* dk_log2_index_bytes */
460
DICT_KEYS_UNICODE, /* dk_kind */
461
1, /* dk_version */
462
0, /* dk_usable (immutable) */
0 commit comments