summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_list.c')
-rw-r--r--src/lib/eina/eina_list.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/eina/eina_list.c b/src/lib/eina/eina_list.c
index 9162088e6e..aa19ca4b19 100644
--- a/src/lib/eina/eina_list.c
+++ b/src/lib/eina/eina_list.c
@@ -385,6 +385,23 @@ eina_list_accessor_free(Eina_Accessor_List *it)
385 MAGIC_FREE(it); 385 MAGIC_FREE(it);
386} 386}
387 387
388static Eina_Accessor*
389eina_list_accessor_clone(Eina_Accessor_List *list)
390{
391 Eina_Accessor_List *ac;
392
393 EINA_MAGIC_CHECK_LIST_ACCESSOR(list, NULL);
394
395 EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL);
396
397 ac = calloc(1, sizeof (Eina_Accessor_List));
398 if (!ac) return NULL;
399
400 memcpy(ac, list, sizeof(Eina_Accessor_List));
401
402 return &ac->accessor;
403}
404
388static Eina_List * 405static Eina_List *
389eina_list_sort_rebuild_prev(Eina_List *list) 406eina_list_sort_rebuild_prev(Eina_List *list)
390{ 407{
@@ -1547,6 +1564,7 @@ eina_list_accessor_new(const Eina_List *list)
1547 ac->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER( 1564 ac->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(
1548 eina_list_accessor_get_container); 1565 eina_list_accessor_get_container);
1549 ac->accessor.free = FUNC_ACCESSOR_FREE(eina_list_accessor_free); 1566 ac->accessor.free = FUNC_ACCESSOR_FREE(eina_list_accessor_free);
1567 ac->accessor.clone = FUNC_ACCESSOR_CLONE(eina_list_accessor_clone);
1550 1568
1551 return &ac->accessor; 1569 return &ac->accessor;
1552} 1570}