summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-02-08 11:50:38 (GMT)
committerGitHub <noreply@github.com>2022-02-08 11:50:38 (GMT)
commit25db2b361beb865192a3424830ddcb0ae4b17318 (patch)
treed9828c3724cc9d56f85c20612e82a8467608cf82 /Python
parent328fe3fd2034a91a15b77a24a307e218d02d7bf1 (diff)
downloadcpython-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.c5
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);