diff options
author | Max Kellermann <max@duempel.org> | 2009-01-03 23:28:51 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-03 23:28:51 +0100 |
commit | 4be479d20c2f81fb0303106b7080af93b3c456c6 (patch) | |
tree | 063534f9464c03b35ac24cb08101cf22cfc499c4 /src/tag.h | |
parent | 149f4e10cf339f90cea05b588b0099febf097b67 (diff) | |
download | mpd-4be479d20c2f81fb0303106b7080af93b3c456c6.tar.gz mpd-4be479d20c2f81fb0303106b7080af93b3c456c6.tar.xz mpd-4be479d20c2f81fb0303106b7080af93b3c456c6.zip |
tag: added function tag_merge()
tag_merges() merges the data from two tag objects into one.
Diffstat (limited to '')
-rw-r--r-- | src/tag.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -90,6 +90,15 @@ static inline void tag_add_item(struct tag *tag, enum tag_type itemType, struct tag *tag_dup(const struct tag *tag); /** + * Merges the data from two tags. If both tags share data for the + * same tag_type, only data from "add" is used. + * + * @return a newly allocated tag, which must be freed with tag_free() + */ +struct tag * +tag_merge(const struct tag *base, const struct tag *add); + +/** * Returns true if the tag contains no items. This ignores the "time" * attribute. */ |