mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-40116: Add insertion order bit-vector to dict values to allow dicts to share keys more freely. (GH-28520)
This commit is contained in:
parent
f6eafe18c0
commit
a7252f88d3
8 changed files with 176 additions and 187 deletions
|
@ -686,10 +686,13 @@ class PyDictObjectPtr(PyObjectPtr):
|
|||
'''
|
||||
keys = self.field('ma_keys')
|
||||
values = self.field('ma_values')
|
||||
has_values = long(values)
|
||||
if has_values:
|
||||
values = values['values']
|
||||
entries, nentries = self._get_entries(keys)
|
||||
for i in safe_range(nentries):
|
||||
ep = entries[i]
|
||||
if long(values):
|
||||
if has_values:
|
||||
pyop_value = PyObjectPtr.from_pyobject_ptr(values[i])
|
||||
else:
|
||||
pyop_value = PyObjectPtr.from_pyobject_ptr(ep['me_value'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue