https://github.com/python/cpython/commit/edefb8678a11a20bdcdcbb8bb6a62ae22101bb51
commit: edefb8678a11a20bdcdcbb8bb6a62ae22101bb51
branch: main
author: Michael Droettboom <[email protected]>
committer: mdboom <[email protected]>
date: 2024-12-02T20:17:08Z
summary:

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

gh-127518: Fix pystats build after #127619

files:
M Python/specialize.c

diff --git a/Python/specialize.c b/Python/specialize.c
index 504eef4f448429..ba13b02a29b133 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -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)) {
@@ -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);
 }
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to