py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.
Saves 168 bytes on bare-arm.
This commit is contained in:
@@ -277,7 +277,7 @@ mp_obj_t mp_obj_int_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) {
|
||||
case MP_BINARY_OP_INPLACE_RSHIFT: {
|
||||
mp_int_t irhs = mp_obj_int_get_checked(rhs_in);
|
||||
if (irhs < 0) {
|
||||
mp_raise_msg(&mp_type_ValueError, "negative shift count");
|
||||
mp_raise_ValueError("negative shift count");
|
||||
}
|
||||
if (op == MP_BINARY_OP_LSHIFT || op == MP_BINARY_OP_INPLACE_LSHIFT) {
|
||||
mpz_shl_inpl(&res->mpz, zlhs, irhs);
|
||||
|
||||
Reference in New Issue
Block a user