blob: 46fb5b36b9f3bd5176fb807b7c220a4033cbae36 [file] [log] [blame]
Paul Sokolovsky8bc35162014-02-14 17:16:35 +02001// Use special typecode to differentiate repr() of bytearray vs array.array('B')
2// (underlyingly they're same).
3#define BYTEARRAY_TYPECODE 0
4
Paul Sokolovsky1355cf42014-04-19 01:25:49 +03005int mp_binary_get_size(char struct_type, char val_type, uint *palign);
Paul Sokolovsky0c43cf92014-04-11 03:47:21 +03006mp_obj_t mp_binary_get_val_array(char typecode, void *p, int index);
Paul Sokolovsky0c43cf92014-04-11 03:47:21 +03007void mp_binary_set_val_array(char typecode, void *p, int index, mp_obj_t val_in);
Damien George71e9bfa2014-04-18 23:28:12 +01008void mp_binary_set_val_array_from_int(char typecode, void *p, int index, machine_int_t val);
Paul Sokolovsky62044602014-04-19 03:13:15 +03009mp_obj_t mp_binary_get_val(char struct_type, char val_type, byte **ptr);
10void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **ptr);