summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorMichael Droettboom <mdboom@gmail.com>2024-12-02 20:17:08 (GMT)
committerGitHub <noreply@github.com>2024-12-02 20:17:08 (GMT)
commitedefb8678a11a20bdcdcbb8bb6a62ae22101bb51 (patch)
tree05cdb97f5148ef8bf61928595f6d123075726d95 /Python/specialize.c
parentc7dec02de2ed4baf3cd22ad094350265b52c18af (diff)
downloadcpython-edefb8678a11a20bdcdcbb8bb6a62ae22101bb51.zip
cpython-edefb8678a11a20bdcdcbb8bb6a62ae22101bb51.tar.gz
cpython-edefb8678a11a20bdcdcbb8bb6a62ae22101bb51.tar.bz2
gh-127518: Fix pystats build after #127169 (#127526)
gh-127518: Fix pystats build after #127619
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 504eef4..ba13b02 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -1816,8 +1816,9 @@ success:
#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)) {
@@ -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);
}