diff options
author | Carl Meyer <carl@oddbird.net> | 2023-05-09 08:53:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 08:53:19 -0600 |
commit | afe7703744f813adb15719642444b5fd35888d86 (patch) | |
tree | bd4aeb37a9b497c35a00f357840715a7f57e8e54 /Python/specialize.c | |
parent | 82f789be3b15df5f6660f5fd0c563ad690ee00fb (diff) | |
download | cpython-git-afe7703744f813adb15719642444b5fd35888d86.tar.gz |
gh-104184: fix building --with-pydebug --enable-pystats (#104217)
Diffstat (limited to 'Python/specialize.c')
-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 b1cc66124c..2ccca3a280 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) { |