py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.

Saves 168 bytes on bare-arm.
This commit is contained in:
Damien George
2017-03-28 22:37:26 +11:00
parent 7b1804c582
commit 94c41bb06f
17 changed files with 53 additions and 53 deletions

View File

@@ -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);