-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
When changing LV_USE_OS from LV_OS_NONE to LV_OS_PTHREAD in lib/lv_conf.h to enable lv.lock() - lv_lock(), the build fails:
build-standard/lv_mpy.c:21533:61: error: incompatible type for argument 1 of ‘mp_obj_new_int’
21533 | case MP_QSTR_lock: dest[0] = mp_obj_new_int(data->lock); break; // converting from lv_mutex_t;
| ~~~~^~~~~~
| |
| lv_mutex_t {aka pthread_mutex_t}
In file included from build-standard/lv_mpy.c:20:
../../py/obj.h:974:34: note: expected ‘mp_int_t’ {aka ‘long int’} but argument is of type ‘lv_mutex_t’ {aka ‘pthread_mutex_t’}
974 | mp_obj_t mp_obj_new_int(mp_int_t value);
| ~~~~~~~~~^~~~~
build-standard/lv_mpy.c:21548:49: error: incompatible types when assigning to type ‘lv_mutex_t’ {aka ‘pthread_mutex_t’} from type ‘int’
21548 | case MP_QSTR_lock: data->lock = (int)mp_obj_get_int(dest[1]); break; // converting to lv_mutex_t;
| ^
build-standard/lv_mpy.c: In function ‘mp_lv_thread_sync_t_attr’:
build-standard/lv_mpy.c:23880:62: error: incompatible type for argument 1 of ‘mp_obj_new_int’
23880 | case MP_QSTR_mutex: dest[0] = mp_obj_new_int(data->mutex); break; // converting from pthread_mutex_t;
| ~~~~^~~~~~~
| |
| pthread_mutex_t
../../py/obj.h:974:34: note: expected ‘mp_int_t’ {aka ‘long int’} but argument is of type ‘pthread_mutex_t’
974 | mp_obj_t mp_obj_new_int(mp_int_t value);
| ~~~~~~~~~^~~~~
build-standard/lv_mpy.c:23881:61: error: incompatible type for argument 1 of ‘mp_obj_new_int’
23881 | case MP_QSTR_cond: dest[0] = mp_obj_new_int(data->cond); break; // converting from pthread_cond_t;
| ~~~~^~~~~~
| |
| pthread_cond_t
../../py/obj.h:974:34: note: expected ‘mp_int_t’ {aka ‘long int’} but argument is of type ‘pthread_cond_t’
974 | mp_obj_t mp_obj_new_int(mp_int_t value);
| ~~~~~~~~~^~~~~
build-standard/lv_mpy.c:23891:51: error: incompatible types when assigning to type ‘pthread_mutex_t’ from type ‘int’
23891 | case MP_QSTR_mutex: data->mutex = (int)mp_obj_get_int(dest[1]); break; // converting to pthread_mutex_t;
| ^
build-standard/lv_mpy.c:23892:49: error: incompatible types when assigning to type ‘pthread_cond_t’ from type ‘int’
23892 | case MP_QSTR_cond: data->cond = (int)mp_obj_get_int(dest[1]); break; // converting to pthread_cond_t;
| ^
I suspect it just needs a bit of magic sprinkled into python_api_gen_mpy.py but after taking a look, I didn't see it...
Metadata
Metadata
Assignees
Labels
No labels