From 8ae390f65142ed38a0b5e2474fc6a21866092e84 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:11 +0200 Subject: tag: renamed MpdTag and MpdTagItem to struct mpd_tag, struct tag_item Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures. --- src/dbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dbUtils.c') diff --git a/src/dbUtils.c b/src/dbUtils.c index 519c1802d..3379b9bb2 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -257,7 +257,7 @@ static void freeListCommandItem(ListCommandItem * item) static void visitTag(int fd, Song * song, enum tag_type tagType) { int i; - MpdTag *tag = song->tag; + struct mpd_tag *tag = song->tag; if (tagType == LOCATE_TAG_FILE_TYPE) { printSongUrl(fd, song); -- cgit v1.2.3 From 6aa1a7a2565bd1789fd34c7c71d5dbb34eaa1fee Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:29 +0200 Subject: tag: converted MpdTag.items to a pointer list This prepares the following patches, which aim to reduce MPD's memory usage: we plan to share tag_item instances, instead of just their values. --- src/dbUtils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dbUtils.c') diff --git a/src/dbUtils.c b/src/dbUtils.c index 3379b9bb2..d39c9908c 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -268,8 +268,8 @@ static void visitTag(int fd, Song * song, enum tag_type tagType) return; for (i = 0; i < tag->numOfItems; i++) { - if (tag->items[i].type == tagType) { - visitInTagTracker(tagType, tag->items[i].value); + if (tag->items[i]->type == tagType) { + visitInTagTracker(tagType, tag->items[i]->value); } } } -- cgit v1.2.3