Skip to content

Commit 417e761

Browse files
committed
apply review
1 parent d5dc19b commit 417e761

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,7 @@ dummy_func(
962962
op(_GUARD_NOS_DICT_NOT_EXACT, (nos, unused -- nos, unused)) {
963963
PyObject *o = PyStackRef_AsPyObjectBorrow(nos);
964964
DEOPT_IF(!Py_TYPE(o)->tp_as_mapping);
965-
DEOPT_IF(Py_TYPE(o)->tp_as_mapping->mp_subscript !=
966-
PyDict_Type.tp_as_mapping->mp_subscript);
965+
DEOPT_IF(Py_TYPE(o)->tp_as_mapping->mp_subscript != _PyDict_Subscript);
967966
}
968967

969968
op(_GUARD_TOS_DICT, (tos -- tos)) {

Python/executor_cases.c.h

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/specialize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ _Py_Specialize_BinaryOp(_PyStackRef lhs_st, _PyStackRef rhs_st, _Py_CODEUNIT *in
26502650
}
26512651
if (PyDict_Check(lhs)) {
26522652
if ((Py_TYPE(lhs)->tp_as_mapping != NULL) &&
2653-
(Py_TYPE(lhs)->tp_as_mapping->mp_subscript == PyDict_Type.tp_as_mapping->mp_subscript))
2653+
(Py_TYPE(lhs)->tp_as_mapping->mp_subscript == _PyDict_Subscript))
26542654
{
26552655
specialize(instr, BINARY_OP_SUBSCR_DICT);
26562656
return;

0 commit comments

Comments
 (0)