Paul Sokolovsky | 8bc3516 | 2014-02-14 17:16:35 +0200 | [diff] [blame] | 1 | // Use special typecode to differentiate repr() of bytearray vs array.array('B') |
| 2 | // (underlyingly they're same). |
| 3 | #define BYTEARRAY_TYPECODE 0 |
| 4 | |
Paul Sokolovsky | 1355cf4 | 2014-04-19 01:25:49 +0300 | [diff] [blame] | 5 | int mp_binary_get_size(char struct_type, char val_type, uint *palign); |
Paul Sokolovsky | 0c43cf9 | 2014-04-11 03:47:21 +0300 | [diff] [blame] | 6 | mp_obj_t mp_binary_get_val_array(char typecode, void *p, int index); |
Paul Sokolovsky | 0c43cf9 | 2014-04-11 03:47:21 +0300 | [diff] [blame] | 7 | void mp_binary_set_val_array(char typecode, void *p, int index, mp_obj_t val_in); |
Damien George | 71e9bfa | 2014-04-18 23:28:12 +0100 | [diff] [blame] | 8 | void mp_binary_set_val_array_from_int(char typecode, void *p, int index, machine_int_t val); |
Paul Sokolovsky | 6204460 | 2014-04-19 03:13:15 +0300 | [diff] [blame] | 9 | mp_obj_t mp_binary_get_val(char struct_type, char val_type, byte **ptr); |
| 10 | void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **ptr); |