extmod: Fix type-punned-ptr error.

This commit is contained in:
Damien George 2014-09-02 11:38:45 +01:00
parent bc9f34860b
commit e875e3882d
1 changed files with 2 additions and 2 deletions

View File

@ -261,10 +261,10 @@ STATIC inline mp_obj_t get_unaligned(uint val_type, void *p, int big_endian) {
} }
} }
STATIC inline void set_unaligned(uint val_type, void *p, int big_endian, mp_obj_t val) { STATIC inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
char struct_type = big_endian ? '>' : '<'; char struct_type = big_endian ? '>' : '<';
static const char type2char[8] = "BbHhIiQq"; static const char type2char[8] = "BbHhIiQq";
mp_binary_set_val(struct_type, type2char[val_type], val, (byte**)&p); mp_binary_set_val(struct_type, type2char[val_type], val, &p);
} }
static inline mp_uint_t get_aligned_basic(uint val_type, void *p) { static inline mp_uint_t get_aligned_basic(uint val_type, void *p) {