mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
merge heads
This commit is contained in:
commit
d4404d659c
1 changed files with 1 additions and 1 deletions
|
|
@ -3686,7 +3686,7 @@ _PyObjectDict_SetItem(PyTypeObject *tp, PyObject **dictptr,
|
|||
res = PyDict_SetItem(dict, key, value);
|
||||
if (cached != ((PyDictObject *)dict)->ma_keys) {
|
||||
/* Either update tp->ht_cached_keys or delete it */
|
||||
if (cached->dk_refcnt == 1) {
|
||||
if (cached->dk_refcnt == 1 && PyDict_CheckExact(dict)) {
|
||||
CACHED_KEYS(tp) = make_keys_shared(dict);
|
||||
if (CACHED_KEYS(tp) == NULL)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue