From bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 31 Jul 2014 10:49:14 +0100 Subject: py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself. Addresses issue #724. --- py/objstrunicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objstrunicode.c') diff --git a/py/objstrunicode.c b/py/objstrunicode.c index 873b4fc58..848005c54 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -257,7 +257,7 @@ STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { #endif if (type == &mp_type_bytes) { uint index_val = mp_get_index(type, self_len, index, false); - return MP_OBJ_NEW_SMALL_INT((mp_int_t)self_data[index_val]); + return MP_OBJ_NEW_SMALL_INT(self_data[index_val]); } const byte *s = str_index_to_ptr(type, self_data, self_len, index, false); int len = 1; -- cgit v1.2.3