changeset 2671:e9b379528fbc trunk

[svn] - playlist_get_length_nolock() -> playlist_get_length(), no need for locking here.
author nenolod
date Tue, 10 Apr 2007 11:27:26 -0700
parents 84a10fce92a1
children d992765e15ee
files ChangeLog src/audacious/build_stamp.c src/audacious/playlist.c
diffstat 3 files changed, 11 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 10 11:25:39 2007 -0700
+++ b/ChangeLog	Tue Apr 10 11:27:26 2007 -0700
@@ -1,3 +1,11 @@
+2007-04-10 18:25:39 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [4366]
+  - playlist_set_info() does not change the playlist and shouldn't block
+  
+  trunk/src/audacious/playlist.c |    8 --------
+  1 file changed, 8 deletions(-)
+
+
 2007-04-10 18:20:21 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [4364]
   - tuple operations do not change the structure of the playlist and 
--- a/src/audacious/build_stamp.c	Tue Apr 10 11:25:39 2007 -0700
+++ b/src/audacious/build_stamp.c	Tue Apr 10 11:27:26 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070410-4364";
+const gchar *svn_stamp = "20070410-4366";
--- a/src/audacious/playlist.c	Tue Apr 10 11:25:39 2007 -0700
+++ b/src/audacious/playlist.c	Tue Apr 10 11:27:26 2007 -0700
@@ -1112,7 +1112,7 @@
         return;
     }
 
-    bottom = MAX(0, playlist_get_length_nolock(playlist) -
+    bottom = MAX(0, playlist_get_length(playlist) -
                  playlistwin_list->pl_num_visible);
     row = CLAMP(pos - playlistwin_list->pl_num_visible / 2, 0, bottom);
     PLAYLIST_UNLOCK(playlist->mutex);
@@ -1491,18 +1491,6 @@
 }
 
 gint
-playlist_get_length(Playlist *playlist)
-{
-    gint retval;
-
-    PLAYLIST_LOCK(playlist->mutex);
-    retval = playlist_get_length_nolock(playlist);
-    PLAYLIST_UNLOCK(playlist->mutex);
-
-    return retval;
-}
-
-gint
 playlist_queue_get_length(Playlist *playlist)
 {
     gint length;
@@ -1515,7 +1503,7 @@
 }
 
 gint
-playlist_get_length_nolock(Playlist *playlist)
+playlist_get_length(Playlist *playlist)
 {
     return g_list_length(playlist->entries);
 }