]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127518: Fix pystats build after #127169 (#127526)
authorMichael Droettboom <mdboom@gmail.com>
Mon, 2 Dec 2024 20:17:08 +0000 (15:17 -0500)
committerGitHub <noreply@github.com>
Mon, 2 Dec 2024 20:17:08 +0000 (20:17 +0000)
gh-127518: Fix pystats build after #127619

Python/specialize.c

index 504eef4f4484297cd1dd0dbdf2c3283142b2b78c..ba13b02a29b133ac23b64a175d4d322a8567687f 100644 (file)
@@ -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);
 }