diff options
Diffstat (limited to 'src/lib/eina/eina_list.h')
-rw-r--r-- | src/lib/eina/eina_list.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/eina/eina_list.h b/src/lib/eina/eina_list.h index a3c17d32e0..4f7e0ff6b0 100644 --- a/src/lib/eina/eina_list.h +++ b/src/lib/eina/eina_list.h @@ -620,6 +620,23 @@ EAPI Eina_List *eina_list_remove_list(Eina_List *list, Eina_List *rem /** + * @brief Remove duplicated list nodes. + * + * @param list The given linked list. + * @param keep_first Keep the first or last occurence + * @return A list pointer. + * + * This function removes multiple node occurences that have the same data. + * It keeps the first or last occurence depending of @p keep_first. + * If @p list is @c NULL, @c NULL is returned, otherwise a new list pointer + * that should be used in place of the one passed to this function. + * + * @warning @p list must be a pointer to the first element of the list. + */ +EAPI Eina_List *eina_list_remove_duplicates(Eina_List *list, Eina_Bool keep_first) EINA_WARN_UNUSED_RESULT; + + +/** * @brief Move the specified data to the head of the list. * * @param list The list handle to move the data. |