aboutsummaryrefslogtreecommitdiff
path: root/py/objfloat.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-03-02 22:35:22 +1100
committerDamien George <damien.p.george@gmail.com>2020-04-05 15:02:06 +1000
commitdef76fe4d9bbc2c342594dc05861b24d7165d274 (patch)
treed04ad778e2421de0a85835227ba5bcb08562ec24 /py/objfloat.c
parent85858e72dfdc3e941c2e620e94de05ad663138b1 (diff)
all: Use MP_ERROR_TEXT for all error messages.
Diffstat (limited to 'py/objfloat.c')
-rw-r--r--py/objfloat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objfloat.c b/py/objfloat.c
index 40619d71c..c7cf049fb 100644
--- a/py/objfloat.c
+++ b/py/objfloat.c
@@ -257,7 +257,7 @@ mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t
case MP_BINARY_OP_INPLACE_FLOOR_DIVIDE:
if (rhs_val == 0) {
zero_division_error:
- mp_raise_msg(&mp_type_ZeroDivisionError, "divide by zero");
+ mp_raise_msg(&mp_type_ZeroDivisionError, MP_ERROR_TEXT("divide by zero"));
}
// Python specs require that x == (x//y)*y + (x%y) so we must
// call divmod to compute the correct floor division, which
@@ -295,7 +295,7 @@ mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t
#if MICROPY_PY_BUILTINS_COMPLEX
return mp_obj_complex_binary_op(MP_BINARY_OP_POWER, lhs_val, 0, rhs_in);
#else
- mp_raise_ValueError("complex values not supported");
+ mp_raise_ValueError(MP_ERROR_TEXT("complex values not supported"));
#endif
}
lhs_val = MICROPY_FLOAT_C_FUN(pow)(lhs_val, rhs_val);