objstr: 64-bit issues.
diff --git a/py/objstr.c b/py/objstr.c
index c732719..714a170 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1446,7 +1446,7 @@
 
     // 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