Skip to content

Commit

Permalink
gh-127518: Fix pystats build after #127169 (#127526)
Browse files Browse the repository at this point in the history
gh-127518: Fix pystats build after #127619
  • Loading branch information
mdboom authored Dec 2, 2024
1 parent c7dec02 commit edefb86
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit edefb86

Please sign in to comment.