summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-09-02 11:38:45 +0100
committerDamien George <damien.p.george@gmail.com>2014-09-02 11:38:45 +0100
commite875e3882d9c567a8b2dc88e9f13e1057fc39e9f (patch)
tree6aee913e261043ad680e2fa5076060fcf1932492
parentbc9f34860b75ef76d5ec4a3452c63eb4210f392b (diff)
downloadmicropython-e875e3882d9c567a8b2dc88e9f13e1057fc39e9f.tar.gz
micropython-e875e3882d9c567a8b2dc88e9f13e1057fc39e9f.zip
extmod: Fix type-punned-ptr error.
-rw-r--r--extmod/moductypes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 0f28a34688..73a8db7cc0 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -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 ? '>' : '<';
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) {