Fully privatize vlc_sd_internal_t
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 11:50:17 +0000 (14:50 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 11:50:17 +0000 (14:50 +0300)
src/playlist/playlist_internal.h
src/playlist/services_discovery.c

index 6afec4a..3d390e0 100644 (file)
 #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
 {
index 57d8928..1aa8f64 100644 (file)
 #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++ )