diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:09 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:09 +0200 |
commit | 0fc2422cd098223642f12eecfc3fcd93d9f495d2 (patch) | |
tree | ce00468b373eb49f449c3743d9d240867daa7927 /src/tag.c | |
parent | e754ed01a77a0dfb5039148cd4990a669ea9024c (diff) | |
download | mpd-0fc2422cd098223642f12eecfc3fcd93d9f495d2.tar.gz mpd-0fc2422cd098223642f12eecfc3fcd93d9f495d2.tar.xz mpd-0fc2422cd098223642f12eecfc3fcd93d9f495d2.zip |
converted MpdTagItem.type to an enum
Don't use CPP macros when you can use C enum... this also allows
better type checking.
Diffstat (limited to '')
-rw-r--r-- | src/tag.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -606,7 +606,7 @@ static void deleteItem(MpdTag * tag, int idx) } } -void clearItemsFromMpdTag(MpdTag * tag, int type) +void clearItemsFromMpdTag(MpdTag * tag, enum tag_type type) { int i; @@ -697,7 +697,8 @@ int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2) } \ } -static void appendToTagItems(MpdTag * tag, int type, char *value, int len) +static void appendToTagItems(MpdTag * tag, enum tag_type type, + char *value, int len) { int i = tag->numOfItems; char *duplicated = xmalloc(len + 1); @@ -717,7 +718,8 @@ static void appendToTagItems(MpdTag * tag, int type, char *value, int len) free(duplicated); } -void addItemToMpdTagWithLen(MpdTag * tag, int itemType, char *value, int len) +void addItemToMpdTagWithLen(MpdTag * tag, enum tag_type itemType, + char *value, int len) { if (ignoreTagItems[itemType]) { |