1
0
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:
canardos 2019-04-18 14:12:30 +08:00
parent 991f892a98
commit 5a88709a5c
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
*/