X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Finclude%2Futils%2Fllist.h;h=f557c9d41c63800ead40925f1414b7da02d80334;hp=93561906b6056a272f468c9c87187469004b8246;hb=da8a2d232053383bebb9c9f483a674a8e1021a57;hpb=7022cf2bc4f8998956e914e7e36b5ca1790d59de diff --git a/src/include/utils/llist.h b/src/include/utils/llist.h index 9356190..f557c9d 100644 --- a/src/include/utils/llist.h +++ b/src/include/utils/llist.h @@ -157,9 +157,9 @@ 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. + * Removes and returns the first matching 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 @@ -169,6 +169,19 @@ sdb_object_t * sdb_llist_remove(sdb_llist_t *list, sdb_llist_lookup_cb lookup, const void *user_data); +/* + * sdb_llist_remove_by_name: + * Removes and returns the first element whose name matches the specified key. + * 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_by_name(sdb_llist_t *list, const char *key); + /* * sdb_llist_shift: * Removes and returns the first element of the list. The ref-count of the