py: Make unichar_charlen() accept/return machine_uint_t.

This commit is contained in:
Paul Sokolovsky
2014-06-28 23:14:30 +03:00
parent a62da515af
commit 9e215fa4c2
5 changed files with 7 additions and 7 deletions

View File

@@ -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