@@ -133,8 +133,8 @@ void mp_obj_int_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
133133 // enough, a dynamic one will be allocated.
134134 char stack_buf [sizeof (mp_int_t ) * 4 ];
135135 char * buf = stack_buf ;
136- mp_uint_t buf_size = sizeof (stack_buf );
137- mp_uint_t fmt_size ;
136+ size_t buf_size = sizeof (stack_buf );
137+ size_t fmt_size ;
138138
139139 char * str = mp_obj_int_formatted (& buf , & buf_size , & fmt_size , self_in , 10 , NULL , '\0' , '\0' );
140140 mp_print_str (print , str );
@@ -180,7 +180,7 @@ size_t mp_int_format_size(size_t num_bits, int base, const char *prefix, char co
180180//
181181// The resulting formatted string will be returned from this function and the
182182// formatted size will be in *fmt_size.
183- char * mp_obj_int_formatted (char * * buf , mp_uint_t * buf_size , mp_uint_t * fmt_size , mp_const_obj_t self_in ,
183+ char * mp_obj_int_formatted (char * * buf , size_t * buf_size , size_t * fmt_size , mp_const_obj_t self_in ,
184184 int base , const char * prefix , char base_char , char comma ) {
185185 fmt_int_t num ;
186186 if (MP_OBJ_IS_SMALL_INT (self_in )) {
@@ -211,7 +211,7 @@ char *mp_obj_int_formatted(char **buf, mp_uint_t *buf_size, mp_uint_t *fmt_size,
211211 sign = '-' ;
212212 }
213213
214- uint needed_size = mp_int_format_size (sizeof (fmt_int_t ) * 8 , base , prefix , comma );
214+ size_t needed_size = mp_int_format_size (sizeof (fmt_int_t ) * 8 , base , prefix , comma );
215215 if (needed_size > * buf_size ) {
216216 * buf = m_new (char , needed_size );
217217 * buf_size = needed_size ;
0 commit comments