Skip to content

Commit cc2ea4c

Browse files
committed
extmod/moductypes: Fix INT_MAYBE return type.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 2227f74 commit cc2ea4c

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
@@ -602,7 +602,7 @@ static mp_obj_t uctypes_struct_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
602602
uint agg_type = GET_TYPE(offset, AGG_TYPE_BITS);
603603
if (agg_type == PTR) {
604604
byte *p = *(void **)self->addr;
605-
return mp_obj_new_int((mp_int_t)(uintptr_t)p);
605+
return mp_obj_new_int_from_uint((mp_int_t)(uintptr_t)p);
606606
}
607607
}
608608
MP_FALLTHROUGH

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy