summaryrefslogtreecommitdiffstats
path: root/Tools/gdb
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-05-28 08:54:10 (GMT)
committerGitHub <noreply@github.com>2021-05-28 08:54:10 (GMT)
commitf8a95df84bcedebc0aa7132b3d1a4e8f000914bc (patch)
treeab5887ed443a0b8f317c4574b4071b76396618d1 /Tools/gdb
parent8994e9c2cd775ddf7b0723824da53fe0d7c039ac (diff)
downloadcpython-f8a95df84bcedebc0aa7132b3d1a4e8f000914bc.zip
cpython-f8a95df84bcedebc0aa7132b3d1a4e8f000914bc.tar.gz
cpython-f8a95df84bcedebc0aa7132b3d1a4e8f000914bc.tar.bz2
bpo-44206: Add a version number to dictionary keys (GH-26333)
* Store log2(size) instead of size in dict-keys. * Use enum instead of function pointer to record kind of keys. * Add version number to dict keys.
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-xTools/gdb/libpython.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index b726b35..c1d2cd8 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -730,7 +730,7 @@ class PyDictObjectPtr(PyObjectPtr):
def _get_entries(self, keys):
dk_nentries = int(keys['dk_nentries'])
- dk_size = int(keys['dk_size'])
+ dk_size = 1<<int(keys['dk_log2_size'])
try:
# <= Python 3.5
return keys['dk_entries'], dk_size