py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.
Addresses issue #724.
diff --git a/py/objstr.c b/py/objstr.c
index 321340e..6ec997f 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -370,7 +370,7 @@
#endif
const byte *p = str_index_to_ptr(type, self_data, self_len, index, false);
if (type == &mp_type_bytes) {
- return MP_OBJ_NEW_SMALL_INT((mp_int_t)*p);
+ return MP_OBJ_NEW_SMALL_INT(*p);
} else {
return mp_obj_new_str((char*)p, 1, true);
}
@@ -1917,7 +1917,7 @@
mp_obj_str_it_t *self = self_in;
GET_STR_DATA_LEN(self->str, str, len);
if (self->cur < len) {
- mp_obj_t o_out = MP_OBJ_NEW_SMALL_INT((mp_int_t)str[self->cur]);
+ mp_obj_t o_out = MP_OBJ_NEW_SMALL_INT(str[self->cur]);
self->cur += 1;
return o_out;
} else {