aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/natmod/features1/features1.c2
-rw-r--r--examples/natmod/features2/main.c2
-rw-r--r--examples/natmod/ure/ure.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/natmod/features1/features1.c b/examples/natmod/features1/features1.c
index 1bfbe50b9..f865f1887 100644
--- a/examples/natmod/features1/features1.c
+++ b/examples/natmod/features1/features1.c
@@ -45,7 +45,7 @@ STATIC mp_int_t fibonacci_helper(mp_int_t x) {
STATIC mp_obj_t fibonacci(mp_obj_t x_in) {
mp_int_t x = mp_obj_get_int(x_in);
if (x < 0) {
- mp_raise_ValueError("can't compute negative Fibonacci number");
+ mp_raise_ValueError(MP_ERROR_TEXT("can't compute negative Fibonacci number"));
}
return mp_obj_new_int(fibonacci_helper(x));
}
diff --git a/examples/natmod/features2/main.c b/examples/natmod/features2/main.c
index de83bf2be..1a39700dc 100644
--- a/examples/natmod/features2/main.c
+++ b/examples/natmod/features2/main.c
@@ -52,7 +52,7 @@ STATIC mp_obj_t productf(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_o
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[0], &bufinfo, MP_BUFFER_RW);
if (bufinfo.typecode != 'f') {
- mp_raise_ValueError("expecting float array");
+ mp_raise_ValueError(MP_ERROR_TEXT("expecting float array"));
}
// Compute product, store result back in first element of array
diff --git a/examples/natmod/ure/ure.c b/examples/natmod/ure/ure.c
index ca1383583..00ca2e9eb 100644
--- a/examples/natmod/ure/ure.c
+++ b/examples/natmod/ure/ure.c
@@ -15,7 +15,7 @@ void mp_stack_check(void) {
// Assumes descending stack on target
volatile char dummy;
if (stack_top - &dummy >= STACK_LIMIT) {
- mp_raise_msg(&mp_type_RuntimeError, "maximum recursion depth exceeded");
+ mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("maximum recursion depth exceeded"));
}
}