GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-127563: use `dk_log2_index_bytes=3` in empty dicts (GH-127568) · 2union/ircpython@9af96f4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Objects
    • dictobject.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Objects/dictobject.c‎

Copy file name to clipboardExpand all lines: Objects/dictobject.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,11 +588,14 @@ estimate_log2_keysize(Py_ssize_t n)
588588

589589
/* This immutable, empty PyDictKeysObject is used for PyDict_Clear()
590590
* (which cannot fail and thus can do no allocation).
591+
*
592+
* See https://github.com/python/cpython/pull/127568#discussion_r1868070614
593+
* for the rationale of using dk_log2_index_bytes=3 instead of 0.
591594
*/
592595
static PyDictKeysObject empty_keys_struct = {
593596
_Py_DICT_IMMORTAL_INITIAL_REFCNT, /* dk_refcnt */
594597
0, /* dk_log2_size */
595-
0, /* dk_log2_index_bytes */
598+
3, /* dk_log2_index_bytes */
596599
DICT_KEYS_UNICODE, /* dk_kind */
597600
#ifdef Py_GIL_DISABLED
598601
{0}, /* dk_mutex */

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.