[vlc-devel] commit: Fully privatize vlc_sd_internal_t ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Oct 17 13:50:31 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 17 14:50:17 2009 +0300| [563c5ec056c32862b2accbe125d4b560e59b7d49] | committer: Rémi Denis-Courmont 

Fully privatize vlc_sd_internal_t

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=563c5ec056c32862b2accbe125d4b560e59b7d49
---

 src/playlist/playlist_internal.h  |    9 +--------
 src/playlist/services_discovery.c |   13 ++++++++++---
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 6afec4a..3d390e0 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -41,14 +41,7 @@
 #include "fetcher.h"
 #include "preparser.h"
 
-typedef struct playlist_services_discovery_support_t {
-    /* the playlist items for category and onelevel */
-    playlist_item_t      *p_cat;
-    playlist_item_t      *p_one;
-    services_discovery_t *p_sd; /**< Loaded service discovery modules */
-    char                 *psz_name;
-} vlc_sd_internal_t;
-
+typedef struct vlc_sd_internal_t vlc_sd_internal_t;
 
 typedef struct playlist_private_t
 {
diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index 57d8928..1aa8f64 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -32,6 +32,14 @@
 #include "playlist_internal.h"
 #include "../libvlc.h"
 
+struct vlc_sd_internal_t
+{
+    /* the playlist items for category and onelevel */
+    playlist_item_t      *p_cat;
+    playlist_item_t      *p_one;
+    services_discovery_t *p_sd; /**< Loaded service discovery modules */
+    char                 *psz_name;
+};
 
 static void services_discovery_Destructor ( vlc_object_t *p_obj );
 
@@ -256,8 +264,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
     }
 
     /* Free in playlist_ServicesDiscoveryRemove */
-    struct playlist_services_discovery_support_t * p_sds;
-    p_sds = malloc( sizeof(struct playlist_services_discovery_support_t) );
+    vlc_sd_internal_t * p_sds = malloc( sizeof(*p_sds) );
     if( !p_sds )
     {
         vlc_sd_Destroy( p_sd );
@@ -315,7 +322,7 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
                                       const char *psz_name )
 {
     playlist_private_t *priv = pl_priv( p_playlist );
-    struct playlist_services_discovery_support_t * p_sds = NULL;
+    vlc_sd_internal_t * p_sds = NULL;
 
     PL_LOCK;
     for( int i = 0; i < priv->i_sds; i++ )




More information about the vlc-devel mailing list