Like the subject line says.
I'm using mp_obj_new_int to pass values between C and python. When I try to pass a number that is greater than 30 bits long I get an "uncaught exception".
Should I be using a different function for larger integers?
mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits
Re: mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits
Paste the actual code for mp_obj_new_int that you’re using. If it can’t fit in a small int, it calls
mp_obj_t mp_obj_new_int_from_ll.
And when are you getting the exception?
Are you in an interrupt?
Sent from my iPhone using Tapatalk Pro
mp_obj_t mp_obj_new_int_from_ll.
And when are you getting the exception?
Are you in an interrupt?
Sent from my iPhone using Tapatalk Pro
Re: mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits
Fixed my problem.
Setting MICROPY_LONGINT_IMPL to MICROPY_LONGINT_IMPL_LONGLONG did the trick.
Setting MICROPY_LONGINT_IMPL to MICROPY_LONGINT_IMPL_LONGLONG did the trick.