summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-14 18:19:16 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-27 00:04:19 +0300
commit26fda6dc8ef77e1acdc3529360a6d1cef23608e4 (patch)
tree1d7c75af8e5d30231093230b8f91af9165e3356f /py
parent00c904b47a4cac2cdf276346039f470f59c90c04 (diff)
downloadmicropython-26fda6dc8ef77e1acdc3529360a6d1cef23608e4.tar.gz
micropython-26fda6dc8ef77e1acdc3529360a6d1cef23608e4.zip
objstr: 64-bit issues.
Diffstat (limited to 'py')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index c732719dd5..714a170d0a 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1446,7 +1446,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(unichar_charlen((const char*)start, end - start) + 1);
+ return MP_OBJ_NEW_SMALL_INT((machine_uint_t)unichar_charlen((const char*)start, end - start) + 1);
}
// count the occurrences