8000 extmod: Fix type-punned-ptr error. · tmbinc/micropython@e875e38 · GitHub
[go: up one dir, main page]

Skip to content

Commit e875e38

Browse files
committed
extmod: Fix type-punned-ptr error.
1 parent bc9f348 commit e875e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extmod/moductypes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ STATIC inline mp_obj_t get_unaligned(uint val_type, void *p, int big_endian) {
261261
}
262262
}
263263

264-
STATIC inline void set_unaligned(uint val_type, void *p, int big_endian, mp_obj_t val) {
264+
STATIC inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
265265
char struct_type = big_endian ? '>' : '<';
266266
static const char type2char[8] = "BbHhIiQq";
267-
mp_binary_set_val(struct_type, type2char[val_type], val, (byte**)&p);
267+
mp_binary_set_val(struct_type, type2char[val_type], val, &p);
268268
}
269269

270270
static inline mp_uint_t get_aligned_basic(uint val_type, void *p) {

0 commit comments

Comments
 (0)
0