Skip to content

Commit f42d42f

Browse files
committed
review comments
1 parent 6630a95 commit f42d42f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Modules/arraymodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,6 +3324,7 @@ array_modexec(PyObject *m)
33243324
if (PyModule_Add(m, "typecodes", typecodes) < 0) {
33253325
return -1;
33263326
}
3327+
33273328
return 0;
33283329
}
33293330

Python/specialize.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,17 +2572,18 @@ binary_op_extended_specialization(PyObject *lhs, PyObject *rhs, int oparg,
25722572
}
25732573
}
25742574

2575-
if (Py_TYPE(lhs)->tp_binop_specialize != NULL) {
2576-
int ret = Py_TYPE(lhs)->tp_binop_specialize(lhs, rhs, oparg, descr);
2575+
PyTypeObject *lhs_type = Py_TYPE(lhs);
2576+
if (lhs_type->tp_binop_specialize != NULL) {
2577+
int ret = lhs_type->tp_binop_specialize(lhs, rhs, oparg, descr);
25772578
if (ret < 0) {
25782579
return -1;
25792580
}
25802581
if (ret == 1) {
25812582
if (*descr == NULL) {
25822583
PyErr_Format(
25832584
PyExc_ValueError,
2584-
"tp_binop_specialize of '%.200s' returned 1 with *descr == NULL",
2585-
Py_TYPE(lhs)->tp_name);
2585+
"tp_binop_specialize of '%T' returned 1 with *descr == NULL",
2586+
lhs_type->tp_name);
25862587
return -1;
25872588
}
25882589
(*descr)->oparg = oparg;

0 commit comments

Comments
 (0)