mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Change assignment to memcpy
This commit is contained in:
parent
991f892a98
commit
5a88709a5c
@ -1877,13 +1877,13 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj)
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the objet's user data
|
||||
* Set the object's user data. The data will be copied.
|
||||
* @param obj pointer to an object
|
||||
* @param data user data
|
||||
*/
|
||||
void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data)
|
||||
{
|
||||
obj->user_data = data;
|
||||
memcpy(&obj->user_data, &data, sizeof(lv_obj_user_data_t));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -859,7 +859,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf);
|
||||
lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj);
|
||||
|
||||
/**
|
||||
* Set the objet's user data
|
||||
* Set the object's user data. The data will be copied.
|
||||
* @param obj pointer to an object
|
||||
* @param data user data
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user