diff options
Diffstat (limited to 'navit/attr.c')
-rw-r--r-- | navit/attr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c index 24b6cbe6a..86bc29489 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -689,6 +689,19 @@ attr_generic_prepend_attr(struct attr **attrs, struct attr *attr) return curr; } +/** + * @brief Removes an attribute from an attribute list. + * + * If `attrs` contains `attr`, a new attribute list is created (which contains all attributes, except + * for `attr`) and both `attrs` (the original attribute list) and `attr` are freed. + * + * If `attrs` does not contain `attr`, this function is a no-op. + * + * @param attrs The attribute list + * @param attr The attribute to remove from the list + * + * @return The new attribute list + */ struct attr ** attr_generic_remove_attr(struct attr **attrs, struct attr *attr) { |