summaryrefslogtreecommitdiff
path: root/py/objstrunicode.c
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
committerGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
commitbcab2ba0a80297100919366add6bada140c6ed75 (patch)
tree5133218f4fc010d5688f006dbdd1e2f346a843f7 /py/objstrunicode.c
parent4468731e3d039a3f72ac25aa43e936cf5ebb3f78 (diff)
parentf869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c (diff)
ports/nrf: Upmerging port with upstream master
Diffstat (limited to 'py/objstrunicode.c')
-rw-r--r--py/objstrunicode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/py/objstrunicode.c b/py/objstrunicode.c
index 0cf791ff7..29f7695b7 100644
--- a/py/objstrunicode.c
+++ b/py/objstrunicode.c
@@ -28,10 +28,8 @@
#include <string.h>
#include <assert.h>
-#include "py/nlr.h"
#include "py/objstr.h"
#include "py/objlist.h"
-#include "py/runtime0.h"
#include "py/runtime.h"
#if MICROPY_PY_BUILTINS_STR_UNICODE
@@ -100,7 +98,7 @@ STATIC void uni_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
}
}
-STATIC mp_obj_t uni_unary_op(mp_uint_t op, mp_obj_t self_in) {
+STATIC mp_obj_t uni_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
GET_STR_DATA_LEN(self_in, str_data, str_len);
switch (op) {
case MP_UNARY_OP_BOOL:
@@ -188,7 +186,7 @@ STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
mp_obj_t ostart, ostop, ostep;
mp_obj_slice_get(index, &ostart, &ostop, &ostep);
if (ostep != mp_const_none && ostep != MP_OBJ_NEW_SMALL_INT(1)) {
- mp_not_implemented("only slices with step=1 (aka None) are supported");
+ mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported");
}
const byte *pstart, *pstop;