From afe7703744f813adb15719642444b5fd35888d86 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Tue, 9 May 2023 08:53:19 -0600 Subject: gh-104184: fix building --with-pydebug --enable-pystats (#104217) --- Python/specialize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v0.12