summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-10-24 22:39:36 +1100
committerDamien George <damien.p.george@gmail.com>2017-10-24 22:39:36 +1100
commitf4059dcc0c5251256a53fcb49f56fdda6e879341 (patch)
treea808f552e7ce64740bcb3ba4d584b0ef8d51abd4 /py
parentcfff12612f92d6ae460e9748394a0cedf3b3d31d (diff)
all: Use NULL instead of "" when calling mp_raise exception helpers.
This is the established way of doing it and reduces code size by a little bit.
Diffstat (limited to 'py')
-rw-r--r--py/objarray.c2
-rw-r--r--py/objlist.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/py/objarray.c b/py/objarray.c
index 8a3e7faad..7003ec9e7 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -286,7 +286,7 @@ STATIC mp_obj_t array_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs
// Otherwise, can only look for a scalar numeric value in an array
if (MP_OBJ_IS_INT(rhs_in) || mp_obj_is_float(rhs_in)) {
- mp_raise_NotImplementedError("");
+ mp_raise_NotImplementedError(NULL);
}
return mp_const_false;
diff --git a/py/objlist.c b/py/objlist.c
index bc22d9fc3..1a18f937d 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -158,7 +158,7 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
mp_obj_list_t *self = MP_OBJ_TO_PTR(self_in);
mp_bound_slice_t slice;
if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice)) {
- mp_raise_NotImplementedError("");
+ mp_raise_NotImplementedError(NULL);
}
mp_int_t len_adj = slice.start - slice.stop;
@@ -198,7 +198,7 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
mp_obj_get_array(value, &value_len, &value_items);
mp_bound_slice_t slice_out;
if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice_out)) {
- mp_raise_NotImplementedError("");
+ mp_raise_NotImplementedError(NULL);
}
mp_int_t len_adj = value_len - (slice_out.stop - slice_out.start);
//printf("Len adj: %d\n", len_adj);