Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Namespace cleanup: Prefix album with ds_

  • Loading branch information...
commit 284a22503de16d949b42ce05b806c628c57d0e55 1 parent 25e9236
@SimonKagstrom authored
View
2  src/bindings/ruby/ext/main.h
@@ -16,7 +16,7 @@ VALUE cTrack;
VALUE eDespotifyError;
-typedef struct album ds_album_t;
+typedef struct ds_album ds_album_t;
typedef struct album_browse ds_album_browse_t;
typedef struct artist ds_artist_t;
typedef struct artist_browse ds_artist_browse_t;
View
2  src/clients/simple/simple.c
@@ -219,7 +219,7 @@ void print_search(struct search_result *search)
if (search->total_albums > 0) {
wrapper_wprintf(L"\nAlbums found (%d):\n", search->total_albums);
- for (struct album* album = search->albums; album; album = album->next)
+ for (struct ds_album* album = search->albums; album; album = album->next)
wrapper_wprintf(L" %s\n", album->name);
}
View
6 src/lib/despotify.h
@@ -44,7 +44,7 @@ struct search_result
int total_albums;
int total_tracks;
struct artist *artists;
- struct album *albums;
+ struct ds_album *albums;
struct track *tracks;
struct ds_playlist *playlist;
};
@@ -62,7 +62,7 @@ struct ds_playlist
struct ds_playlist *next; /* in case of multiple playlists in the root list */
};
-struct album
+struct ds_album
{
char name[STRING_LENGTH];
char id[33];
@@ -70,7 +70,7 @@ struct album
char artist_id[33];
char cover_id[41];
float popularity;
- struct album* next;
+ struct ds_album* next;
};
struct album_browse
View
16 src/lib/xml.c
@@ -326,7 +326,7 @@ void xml_free_track(struct track* head)
}
-static void parse_album(ezxml_t top, struct album* a) {
+static void parse_album(ezxml_t top, struct ds_album* a) {
xmlstrncpy(a->name, sizeof a->name, top, "name", -1);
xmlstrncpy(a->id, sizeof a->id, top, "id", -1);
xmlstrncpy(a->artist, sizeof a->artist, top, "artist-name", -1);
@@ -413,12 +413,12 @@ int xml_parse_search(struct search_result* search,
}
ezxml_t albums = ezxml_get(top, "albums",-1);
- struct album *aprev = NULL;
- struct album *album = calloc(1, sizeof(struct album));
+ struct ds_album *aprev = NULL;
+ struct ds_album *album = calloc(1, sizeof(struct ds_album));
search->albums = album;
for (ezxml_t xa = ezxml_get(albums, "album", -1); xa; xa = xa->next) {
if(aprev) {
- album = calloc(1, sizeof(struct album));
+ album = calloc(1, sizeof(struct ds_album));
aprev->next = album;
}
@@ -465,7 +465,7 @@ bool xml_parse_browse_artist(struct artist_browse* a,
int album_count = 0;
for (ezxml_t xalb = ezxml_get(x, "album", -1); xalb; xalb = xalb->next) {
if (prev) {
- album = calloc(1, sizeof(struct album));
+ album = calloc(1, sizeof(struct ds_album));
prev->next = album;
}
@@ -509,10 +509,10 @@ bool xml_parse_browse_album(struct album_browse* a,
return true;
}
-void xml_free_album(struct album* album)
+void xml_free_album(struct ds_album* album)
{
- struct album* next_album = album;
- for (struct album* a = next_album; next_album; a = next_album) {
+ struct ds_album* next_album = album;
+ for (struct ds_album* a = next_album; next_album; a = next_album) {
next_album = a->next;
free(a);
}
View
2  src/lib/xml.h
@@ -42,7 +42,7 @@ void xml_free_playlist(struct ds_playlist* pl);
void xml_free_track(struct track* head);
void xml_free_artist(struct artist* artist);
void xml_free_artist_browse(struct artist_browse* artist);
-void xml_free_album(struct album* album);
+void xml_free_album(struct ds_album* album);
void xml_free_album_browse(struct album_browse* album);
void xml_parse_prodinfo(struct user_info* u, unsigned char* xml, int len);
Please sign in to comment.
Something went wrong with that request. Please try again.