diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-20 16:20:48 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-20 16:58:31 -0700 |
commit | 1952b762b0b7024c6a993e62ad957718ac669ac4 (patch) | |
tree | b85434889e082ff3425d2c5209fc8dc41e5fedf4 /src/song.h | |
parent | 8f475cc0ff4640f60c139e037b38d5c0225e1478 (diff) | |
download | mpd-1952b762b0b7024c6a993e62ad957718ac669ac4.tar.gz mpd-1952b762b0b7024c6a993e62ad957718ac669ac4.tar.xz mpd-1952b762b0b7024c6a993e62ad957718ac669ac4.zip |
Replace SongList with struct songvec
Our linked-list implementation is wasteful and the
SongList isn't modified enough to benefit from being a linked
list. So use a more compact array of song pointers which
saves ~200K on a library with ~9K songs (on x86-32).
Diffstat (limited to '')
-rw-r--r-- | src/song.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/song.h b/src/song.h index d27596abd..c31c39829 100644 --- a/src/song.h +++ b/src/song.h @@ -24,6 +24,8 @@ #include "tag.h" #include "list.h" +#define SONG_KEY "key: " +#define SONG_MTIME "mtime: " #define SONG_BEGIN "songList begin" #define SONG_END "songList end" @@ -58,12 +60,7 @@ Song *addSongToList(SongList * list, const char *url, const char *utf8path, int printSongInfo(int fd, Song * song); -int printSongInfoFromList(int fd, SongList * list); - -void writeSongInfoFromList(int fd, SongList * list); - -void readSongInfoIntoList(FILE * fp, SongList * list, - struct _Directory *parent); +void readSongInfoIntoList(FILE * fp, struct _Directory *parent); int updateSongInfo(Song * song); |