aboutsummaryrefslogtreecommitdiff
path: root/src/tag.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-03-17 23:12:21 +0100
committerMax Kellermann <max@duempel.org>2010-03-17 23:12:21 +0100
commit2e72a9b262ac71a8a7e8ed9b00efa80597d5f17d (patch)
tree1d053e0828b76946b23a57d683dff4b157debae6 /src/tag.h
parent96033e4b4e9ed599d8663a4d2d5a9dd586957bab (diff)
tag: added function tag_merge_replace()
Like tag_merge(), but can deal with NULL parameters, and frees both tag objects.
Diffstat (limited to 'src/tag.h')
-rw-r--r--src/tag.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tag.h b/src/tag.h
index 4b72dd18..75a86b38 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -166,6 +166,15 @@ struct tag *
tag_merge(const struct tag *base, const struct tag *add);
/**
+ * Merges the data from two tags. Any of the two may be NULL. Both
+ * are freed by this function.
+ *
+ * @return a newly allocated tag, which must be freed with tag_free()
+ */
+struct tag *
+tag_merge_replace(struct tag *base, struct tag *add);
+
+/**
* Returns true if the tag contains no items. This ignores the "time"
* attribute.
*/