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:
Mark Shannon 2021-10-06 13:19:53 +01:00 committed by GitHub
parent f6eafe18c0
commit a7252f88d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 176 additions and 187 deletions

View file

@ -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'])