forked fromlvgl-micropython/lvgl_micropython
- Notifications
You must be signed in to change notification settings - Fork3
Commitec19858
committed
Adjust binding code generator to fix UnicodeError
This change addresses a UnicodeError in the MicroPython-LVGL binding generatorby explicitly handling `char *` arguments in `build_callback_func_arg`.Previously, the function relied on the `lv_to_mp` dictionary for all typeconversions, which could lead to incorrect or missing converters for `char *`,causing encoding issues. Now, `char *` arguments are assigned the `ptr_to_mp`converter directly, ensuring proper conversion to MicroPython string objects.Additionally, the initial type extraction preserves qualifiers(`remove_quals=False`) to improve type handling accuracy, while maintainingcompatibility for non-`char *` types by stripping qualifiers in the fallbackpath.1 parenteda82dd commitec19858
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2865 | 2865 | | |
2866 | 2866 | | |
2867 | 2867 | | |
2868 | | - | |
| 2868 | + | |
2869 | 2869 | | |
2870 | | - | |
2871 | | - | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
2872 | 2875 | | |
2873 | | - | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
2874 | 2880 | | |
2875 | 2881 | | |
2876 | 2882 | | |
| |||
2880 | 2886 | | |
2881 | 2887 | | |
2882 | 2888 | | |
| 2889 | + | |
2883 | 2890 | | |
2884 | | - | |
| 2891 | + | |
2885 | 2892 | | |
2886 | 2893 | | |
2887 | 2894 | | |
| |||
0 commit comments
Comments
(0)