Skip to content

Commit fe3e17b

Browse files
committed
py/objint: Use MP_OBJ_IS_STR_OR_BYTES macro instead of 2 separate ones.
1 parent 8769049 commit fe3e17b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/objint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ mp_obj_t mp_obj_int_binary_op_extra_cases(mp_binary_op_t op, mp_obj_t lhs_in, mp
378378
// true acts as 0
379379
return mp_binary_op(op, lhs_in, MP_OBJ_NEW_SMALL_INT(1));
380380
} else if (op == MP_BINARY_OP_MULTIPLY) {
381-
if (MP_OBJ_IS_STR(rhs_in) || MP_OBJ_IS_TYPE(rhs_in, &mp_type_bytes) || MP_OBJ_IS_TYPE(rhs_in, &mp_type_tuple) || MP_OBJ_IS_TYPE(rhs_in, &mp_type_list)) {
381+
if (MP_OBJ_IS_STR_OR_BYTES(rhs_in) || MP_OBJ_IS_TYPE(rhs_in, &mp_type_tuple) || MP_OBJ_IS_TYPE(rhs_in, &mp_type_list)) {
382382
// multiply is commutative for these types, so delegate to them
383383
return mp_binary_op(op, rhs_in, lhs_in);
384384
}

0 commit comments

Comments
 (0)