X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Finclude%2Futils%2Fllist.h;h=af8285f6a3367fdc026f81bf0387243ff143c20f;hp=298c6ceb8779e9238ade411ca1a3ffb622a41545;hb=982e6a7ccff9493d3faec0d0327634c2a13ac019;hpb=c1abeae76c2135185e553dda6d9bec78a41fa894 diff --git a/src/include/utils/llist.h b/src/include/utils/llist.h index 298c6ce..af8285f 100644 --- a/src/include/utils/llist.h +++ b/src/include/utils/llist.h @@ -146,6 +146,20 @@ sdb_llist_search(sdb_llist_t *list, sdb_object_t * sdb_llist_search_by_name(sdb_llist_t *list, const char *key); +/* + * sdb_llist_remove: + * Removes and returns the first matchin element of the list. The ref-count of + * the item will not be changed, that is, if the element will not be used any + * further, it should be de-referenced by the caller. + * + * Returns: + * - a pointer to the first matching object + * - NULL else + */ +sdb_object_t * +sdb_llist_remove(sdb_llist_t *list, + sdb_llist_lookup_cb lookup, void *user_data); + /* * sdb_llist_shift: * Removes and returns the first element of the list. The ref-count of the