Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gen/gen_mpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,13 @@ def register_int_ptr_type(convertor, *types):

unsigned long long val = 0;
bool big_endian = !(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__);
// mp_obj_int_to_bytes() replaced mp_obj_int_to_bytes_impl() in MicroPython
// 1.29 (commit e00daa3a), adding is_signed and overflow_check parameters.
#if MICROPY_VERSION >= MICROPY_MAKE_VERSION(1, 29, 0)
mp_obj_int_to_bytes(obj, sizeof(val), (byte*)&val, big_endian, false, false);
#else
mp_obj_int_to_bytes_impl(obj, big_endian, sizeof(val), (byte*)&val);
#endif
return val;
}

Expand Down
6 changes: 6 additions & 0 deletions gen/lv_mpy_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,13 @@ STATIC unsigned long long mp_obj_get_ull(mp_obj_t obj)

unsigned long long val = 0;
bool big_endian = !(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__);
// mp_obj_int_to_bytes() replaced mp_obj_int_to_bytes_impl() in MicroPython
// 1.29 (commit e00daa3a), adding is_signed and overflow_check parameters.
#if MICROPY_VERSION >= MICROPY_MAKE_VERSION(1, 29, 0)
mp_obj_int_to_bytes(obj, sizeof(val), (byte*)&val, big_endian, false, false);
#else
mp_obj_int_to_bytes_impl(obj, big_endian, sizeof(val), (byte*)&val);
#endif
return val;
}

Expand Down
Loading