Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update sizeof calculation
  • Loading branch information
brijkapadia committed May 31, 2026
commit fce9aa9179d6b98a269a7c432b9c9b69646e8f98
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5058,7 +5058,7 @@ _PyDict_KeysSize(PyDictKeysObject *keys)
{
size_t es = (keys->dk_kind == DICT_KEYS_GENERAL
? sizeof(PyDictKeyEntry) : sizeof(PyDictUnicodeEntry));
size_t size = sizeof(PyDictKeysObject);
size_t size = sizeof(PyDictKeysObject) - sizeof(PyDictKeyEntry);
size += (size_t)1 << keys->dk_log2_index_bytes;
size += USABLE_FRACTION((size_t)DK_SIZE(keys)) * es;
return size;
Expand Down
Loading