8000 extmod/uctypes: Allow full 32-bit address range. · sparkfun/circuitpython@b84e123 · GitHub
[go: up one dir, main page]

Skip to content

Commit b84e123

Browse files
agnerspfalcon
authored andcommitted
extmod/uctypes: Allow full 32-bit address range.
Use mp_obj_int_get_truncated to allow the full 32-bit address range as first parameter.
1 parent 9ea2882 commit b84e123

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extmod/moductypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args
125125
mp_arg_check_num(n_args, n_kw, 2, 3, false);
126126
mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t);
127127
o->base.type = type;
128-
o->addr = (void*)(uintptr_t)mp_obj_get_int(args[0]);
128+
o->addr = (void*)(uintptr_t)mp_obj_int_get_truncated(args[0]);
129129
o->desc = args[1];
130130
o->flags = LAYOUT_NATIVE;
131131
if (n_args == 3) {

0 commit comments

Comments
 (0)
0