From 7d0d7215d2575a2d36d34c9a13b58cade0610a28 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 17 Oct 2016 12:17:37 +1100 Subject: py: Use mp_raise_msg helper function where appropriate. Saves the following number of bytes of code space: 176 for bare-arm, 352 for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266. --- py/objfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objfloat.c') diff --git a/py/objfloat.c b/py/objfloat.c index 85b8b13861..73d07feac8 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -198,7 +198,7 @@ mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs_i case MP_BINARY_OP_INPLACE_FLOOR_DIVIDE: if (rhs_val == 0) { zero_division_error: - nlr_raise(mp_obj_new_exception_msg(&mp_type_ZeroDivisionError, "division by zero")); + mp_raise_msg(&mp_type_ZeroDivisionError, "division by zero"); } // Python specs require that x == (x//y)*y + (x%y) so we must // call divmod to compute the correct floor division, which -- cgit v1.2.3