aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-16 19:11:40 +0200
committerMax Kellermann <max@duempel.org>2008-09-16 19:11:40 +0200
commit4d01c183b4c1e4c51dff3d9aeec1c01ce13a4323 (patch)
tree10d4c33914aed3a30600b804af698f12c93f718a /src/playlist.c
parent3ac0e9238308d8acea506fc95679fe8d5ae44f45 (diff)
downloadmpd-4d01c183b4c1e4c51dff3d9aeec1c01ce13a4323.tar.gz
mpd-4d01c183b4c1e4c51dff3d9aeec1c01ce13a4323.tar.xz
mpd-4d01c183b4c1e4c51dff3d9aeec1c01ce13a4323.zip
use GPtrArray instead of GArray for playlist songs
Diffstat (limited to '')
-rw-r--r--src/playlist.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/playlist.c b/src/playlist.c
index d14f870b0..6751e5dad 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -34,8 +34,7 @@ playlist_init(struct mpdclient_playlist *playlist)
{
playlist->id = 0;
playlist->updated = FALSE;
- playlist->list = g_array_sized_new(FALSE, FALSE,
- sizeof(struct mpd_song *), 1024);
+ playlist->list = g_ptr_array_sized_new(1024);
}
void
@@ -49,7 +48,7 @@ playlist_clear(struct mpdclient_playlist *playlist)
mpd_freeSong(song);
}
- g_array_set_size(playlist->list, 0);
+ g_ptr_array_set_size(playlist->list, 0);
}
gint
@@ -57,7 +56,7 @@ mpdclient_playlist_free(mpdclient_playlist_t *playlist)
{
if (playlist->list != NULL) {
playlist_clear(playlist);
- g_array_free(playlist->list, TRUE);
+ g_ptr_array_free(playlist->list, TRUE);
}
memset(playlist, 0, sizeof(mpdclient_playlist_t));