mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
fix instance dicts with str subclasses (#13903)
This commit is contained in:
parent
53b977127f
commit
db780d0d13
2 changed files with 15 additions and 1 deletions
|
@ -641,7 +641,11 @@ lookdict_split(PyDictObject *mp, PyObject *key,
|
|||
register PyDictKeyEntry *ep;
|
||||
|
||||
if (!PyUnicode_CheckExact(key)) {
|
||||
return lookdict(mp, key, hash, value_addr);
|
||||
ep = lookdict(mp, key, hash, value_addr);
|
||||
/* lookdict expects a combined-table, so fix value_addr */
|
||||
i = ep - ep0;
|
||||
*value_addr = &mp->ma_values[i];
|
||||
return ep;
|
||||
}
|
||||
i = (size_t)hash & mask;
|
||||
ep = &ep0[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue