Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit afe7703

Browse filesBrowse files
authored
gh-104184: fix building --with-pydebug --enable-pystats (#104217)
1 parent 82f789b commit afe7703
Copy full SHA for afe7703

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎Python/specialize.c

Copy file name to clipboardExpand all lines: Python/specialize.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ _Py_Specialize_StoreSubscr(PyObject *container, PyObject *sub, _Py_CODEUNIT *ins
14551455
goto fail;
14561456
}
14571457
if (PyObject_CheckBuffer(container)) {
1458-
if (PyLong_CheckExact(sub) && (((size_t)Py_SIZE(sub)) > 1)) {
1458+
if (PyLong_CheckExact(sub) && (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub))) {
14591459
SPECIALIZATION_FAIL(STORE_SUBSCR, SPEC_FAIL_OUT_OF_RANGE);
14601460
}
14611461
else if (strcmp(container_type->tp_name, "array.array") == 0) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.