aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tag.c b/src/tag.c
index 34205d20d..c34256b78 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -247,6 +247,22 @@ tag_merge(const struct tag *base, const struct tag *add)
return ret;
}
+struct tag *
+tag_merge_replace(struct tag *base, struct tag *add)
+{
+ if (add == NULL)
+ return base;
+
+ if (base == NULL)
+ return add;
+
+ struct tag *tag = tag_merge(base, add);
+ tag_free(base);
+ tag_free(add);
+
+ return tag;
+}
+
const char *
tag_get_value(const struct tag *tag, enum tag_type type)
{