From 9e215fa4c2773b7a4102aec4203c9bf74aa0eccc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 28 Jun 2014 23:14:30 +0300 Subject: py: Make unichar_charlen() accept/return machine_uint_t. --- py/objstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objstr.c') diff --git a/py/objstr.c b/py/objstr.c index a4749369d..b13517b63 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -1448,7 +1448,7 @@ STATIC mp_obj_t str_count(uint n_args, const mp_obj_t *args) { // if needle_len is zero then we count each gap between characters as an occurrence if (needle_len == 0) { - return MP_OBJ_NEW_SMALL_INT((machine_uint_t)unichar_charlen((const char*)start, end - start) + 1); + return MP_OBJ_NEW_SMALL_INT(unichar_charlen((const char*)start, end - start) + 1); } // count the occurrences -- cgit v1.2.3