modstruct: Fix alignment handling issues.

Also, factor out mp_binary_get_int() function.
This commit is contained in:
Paul Sokolovsky
2014-06-25 22:25:53 +03:00
parent 5aa740c3e2
commit 7a2f166949
3 changed files with 30 additions and 19 deletions

View File

@@ -34,3 +34,4 @@ void mp_binary_set_val_array(char typecode, void *p, int index, mp_obj_t val_in)
void mp_binary_set_val_array_from_int(char typecode, void *p, int index, machine_int_t val);
mp_obj_t mp_binary_get_val(char struct_type, char val_type, byte **ptr);
void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **ptr);
machine_int_t mp_binary_get_int(uint size, bool is_signed, bool big_endian, byte *p);