From fed719197c7014151710c4aae9174990fd131d59 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Jan 2009 19:09:34 +0100 Subject: song: allocate the result of song_get_url() --- src/song.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/song.h') diff --git a/src/song.h b/src/song.h index 7f40b7e9..a4c72cf6 100644 --- a/src/song.h +++ b/src/song.h @@ -61,14 +61,15 @@ song_file_update(struct song *song); bool song_file_update_inarchive(struct song *song); -/* - * song_get_url - Returns a path of a song in UTF8-encoded form - * path_max_tmp is the argument that the URL is written to, this - * buffer is assumed to be MPD_PATH_MAX or greater (including - * terminating '\0'). +/** + * Returns the URI of the song in UTF-8 encoding, including its + * location within the music directory. + * + * The return value is allocated on the heap, and must be freed by the + * caller. */ char * -song_get_url(const struct song *song, char *path_max_tmp); +song_get_uri(const struct song *song); static inline bool song_in_database(const struct song *song) -- cgit v1.2.3