diff options
author | Mark Shannon <mark@hotpy.org> | 2022-02-08 11:50:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 11:50:38 (GMT) |
commit | 25db2b361beb865192a3424830ddcb0ae4b17318 (patch) | |
tree | d9828c3724cc9d56f85c20612e82a8467608cf82 /Python | |
parent | 328fe3fd2034a91a15b77a24a307e218d02d7bf1 (diff) | |
download | cpython-25db2b361beb865192a3424830ddcb0ae4b17318.zip cpython-25db2b361beb865192a3424830ddcb0ae4b17318.tar.gz cpython-25db2b361beb865192a3424830ddcb0ae4b17318.tar.bz2 |
bpo-46675: Allow object value arrays and split key dictionaries larger than 16 (GH-31191)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 52dbd6e..dcceee5 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3536,14 +3536,13 @@ handle_eval_breaker: PyDictValues *values = *_PyObject_ValuesPointer(owner); DEOPT_IF(values == NULL, STORE_ATTR); STAT_INC(STORE_ATTR, hit); - int index = cache0->index; + Py_ssize_t index = cache0->index; STACK_SHRINK(1); PyObject *value = POP(); PyObject *old_value = values->values[index]; values->values[index] = value; if (old_value == NULL) { - assert(index < 16); - values->mv_order = (values->mv_order << 4) | index; + _PyDictValues_AddToInsertionOrder(values, index); } else { Py_DECREF(old_value); |