4242#define alignof (type ) offsetof(struct { char c; type t; }, t)
4343#endif
4444
45- int mp_binary_get_size (char struct_type , char val_type , uint * palign ) {
45+ int mp_binary_get_size (char struct_type , char val_type , mp_uint_t * palign ) {
4646 int size = 0 ;
4747 int align = 1 ;
4848 switch (struct_type ) {
@@ -134,7 +134,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, int index) {
134134 return MP_OBJ_NEW_SMALL_INT (val );
135135}
136136
137- mp_int_t mp_binary_get_int (uint size , bool is_signed , bool big_endian , byte * p ) {
137+ mp_int_t mp_binary_get_int (mp_uint_t size , bool is_signed , bool big_endian , byte * p ) {
138138 int delta ;
139139 if (!big_endian ) {
140140 delta = -1 ;
@@ -159,7 +159,7 @@ mp_int_t mp_binary_get_int(uint size, bool is_signed, bool big_endian, byte *p)
159159#define is_signed (typecode ) (typecode > 'Z')
160160mp_obj_t mp_binary_get_val (char struct_type , char val_type , byte * * ptr ) {
161161 byte * p = * ptr ;
162- uint align ;
162+ mp_uint_t align ;
163163
164164 int size = mp_binary_get_size (struct_type , val_type , & align );
165165 if (struct_type == '@' ) {
@@ -186,7 +186,7 @@ mp_obj_t mp_binary_get_val(char struct_type, char val_type, byte **ptr) {
186186 }
187187}
188188
189- void mp_binary_set_int (uint val_sz , bool big_endian , byte * p , byte * val_ptr ) {
189+ void mp_binary_set_int (mp_uint_t val_sz , bool big_endian , byte * p , byte * val_ptr ) {
190190 int in_delta , out_delta ;
191191 if (big_endian ) {
192192 in_delta = -1 ;
@@ -205,7 +205,7 @@ void mp_binary_set_int(uint val_sz, bool big_endian, byte *p, byte *val_ptr) {
205205
206206void mp_binary_set_val (char struct_type , char val_type , mp_obj_t val_in , byte * * ptr ) {
207207 byte * p = * ptr ;
208- uint align ;
208+ mp_uint_t align ;
209209
210210 int size = mp_binary_get_size (struct_type , val_type , & align );
211211 if (struct_type == '@' ) {
0 commit comments