Skip to content

gh-127518: Fix pystats build after #127169 #127526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,9 @@ _Py_Specialize_BinarySubscr(

#ifdef Py_STATS
static int
store_subscr_fail_kind(PyObject *container_type)
store_subscr_fail_kind(PyObject *container, PyObject *sub)
{
PyTypeObject *container_type = Py_TYPE(container);
PyMappingMethods *as_mapping = container_type->tp_as_mapping;
if (as_mapping && (as_mapping->mp_ass_subscript
== PyDict_Type.tp_as_mapping->mp_ass_subscript)) {
Expand Down Expand Up @@ -1915,7 +1916,7 @@ _Py_Specialize_StoreSubscr(_PyStackRef container_st, _PyStackRef sub_st, _Py_COD
specialize(instr, STORE_SUBSCR_DICT);
return;
}
SPECIALIZATION_FAIL(STORE_SUBSCR, store_subscr_fail_kind(container_type));
SPECIALIZATION_FAIL(STORE_SUBSCR, store_subscr_fail_kind(container, sub));
unspecialize(instr);
}

Expand Down
Loading