fix(gen): support MicroPython's renamed mp_obj_int_to_bytes() API
Summary
MicroPython commit e00daa3a ("py/binary,objint: Add overflow checks and int.to_bytes(signed=True)") renamed mp_obj_int_to_bytes_impl() to mp_obj_int_to_bytes() and changed its signature, adding is_signed and overflow_check parameters. The generated binding calls this helper in mp_obj_get_ull(), so building against MicroPython 1.29 or later fails to link with undefined reference to 'mp_obj_int_to_bytes_impl'.
This guards the call on MICROPY_VERSION >= MICROPY_MAKE_VERSION(1, 29, 0), calling the new API on 1.29+ and the old one on earlier versions. The reverse helper mp_obj_int_from_bytes_impl() was not renamed and is unchanged.
lv_micropython merges the upstream MicroPython master that carries the rename, so it needs the same fix: lvgl/lv_micropython#106.
Testing
Built the binding into a MicroPython firmware for an i.MX RT1176 board (mimxrt port, arm-none-eabi) against a 1.29 MicroPython: it links, and mp_obj_get_ull() compiles the mp_obj_int_to_bytes() call. The pre-1.29 branch of the guard was checked by preprocessing against a 1.24 header, which selects the old call.
I did not test the unix port.
Generative AI
I used generative AI tools when creating this PR, but a human has checked the code and is responsible for the code and the description above.