Closed
Description
Hello,
correct me if im wrong, but
mp_int_t in = -0x80000000;
mp_obj_t i = mp_obj_new_int_from_ll(in);
mp_int_t out = mp_obj_int_get_checked(i);
throws
OverflowError: overflow converting long int to machine word
I would expect this conversion to be valid since -0x80000000 is in the range of a int32.
This works:
mp_int_t in = -0x7FFFFFFF;
mp_obj_t i = mp_obj_new_int_from_ll(in);
mp_int_t out = mp_obj_int_get_checked(i);
Sebastian
Metadata
Metadata
Assignees
Labels
No labels