diff options
author | Mark Shannon <mark@hotpy.org> | 2021-05-28 08:54:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 08:54:10 (GMT) |
commit | f8a95df84bcedebc0aa7132b3d1a4e8f000914bc (patch) | |
tree | ab5887ed443a0b8f317c4574b4071b76396618d1 /Tools/gdb | |
parent | 8994e9c2cd775ddf7b0723824da53fe0d7c039ac (diff) | |
download | cpython-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-x | Tools/gdb/libpython.py | 2 |
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 |