diff options
author | Carl Meyer <carl@oddbird.net> | 2023-05-09 14:53:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 14:53:19 (GMT) |
commit | afe7703744f813adb15719642444b5fd35888d86 (patch) | |
tree | bd4aeb37a9b497c35a00f357840715a7f57e8e54 /Python | |
parent | 82f789be3b15df5f6660f5fd0c563ad690ee00fb (diff) | |
download | cpython-afe7703744f813adb15719642444b5fd35888d86.zip cpython-afe7703744f813adb15719642444b5fd35888d86.tar.gz cpython-afe7703744f813adb15719642444b5fd35888d86.tar.bz2 |
gh-104184: fix building --with-pydebug --enable-pystats (#104217)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/specialize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index b1cc661..2ccca3a 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -1455,7 +1455,7 @@ _Py_Specialize_StoreSubscr(PyObject *container, PyObject *sub, _Py_CODEUNIT *ins goto fail; } if (PyObject_CheckBuffer(container)) { - if (PyLong_CheckExact(sub) && (((size_t)Py_SIZE(sub)) > 1)) { + if (PyLong_CheckExact(sub) && (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub))) { SPECIALIZATION_FAIL(STORE_SUBSCR, SPEC_FAIL_OUT_OF_RANGE); } else if (strcmp(container_type->tp_name, "array.array") == 0) { |