]> git.sesse.net Git - vlc/commitdiff
vlc_list_children: use vlc_value_t.p_address, not .p_object
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 19 Feb 2015 22:09:31 +0000 (00:09 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 19 Feb 2015 22:14:50 +0000 (00:14 +0200)
This was a remnant from the times of VLC_VAR_OBJECT.

include/vlc_common.h
modules/gui/ncurses.c
modules/gui/qt4/components/complete_preferences.cpp
modules/gui/qt4/dialogs/messages.cpp
src/misc/objects.c

index 14909321148ce7d2c9e9090a820c8bb40f544403..98d91fcccc107438356a7b77c443b6257aa06d9c 100644 (file)
@@ -340,7 +340,6 @@ typedef union
     float           f_float;
     char *          psz_string;
     void *          p_address;
-    vlc_object_t *  p_object;
     vlc_list_t *    p_list;
     mtime_t         i_time;
     struct { int32_t x; int32_t y; } coords;
index d64afd648ffefc9ad1dd0fad74ae074f32c3f57e..a5e786c33e4df856fc4d695b9df2b9eadda5edde 100644 (file)
@@ -718,7 +718,7 @@ static int SubDrawObject(intf_sys_t *sys, int l, vlc_object_t *p_obj, int i_leve
 
     vlc_list_t *list = vlc_list_children(p_obj);
     for (int i = 0; i < list->i_count ; i++) {
-        l = SubDrawObject(sys, l, list->p_values[i].p_object, i_level,
+        l = SubDrawObject(sys, l, list->p_values[i].p_address, i_level,
             (i == list->i_count - 1) ? "`-" : "|-" );
     }
     vlc_list_release(list);
index c4e98f7b03c01713a258bb085ebd60769feb0485..8841b7939d081e3ad5837bf8bf8235ca32c9b4b4 100644 (file)
@@ -408,7 +408,7 @@ static void populateLoadedSet( QSet<QString> *loaded, vlc_object_t *p_node )
 
     vlc_list_t *l = vlc_list_children( p_node );
     for( int i=0; i < l->i_count; i++ )
-        populateLoadedSet( loaded, l->p_values[i].p_object );
+        populateLoadedSet( loaded, (vlc_object_t *)l->p_values[i].p_address );
     vlc_list_release( l );
 }
 
index 252dcc4aa09a21083a627afed1de754524853975..21c11107c7c54f53f66e4ef79f02d5b7d199cb2e 100644 (file)
@@ -309,7 +309,7 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
 
     vlc_list_t *l = vlc_list_children( p_obj );
     for( int i=0; i < l->i_count; i++ )
-        buildTree( item, l->p_values[i].p_object );
+        buildTree( item, (vlc_object_t *)l->p_values[i].p_address );
     vlc_list_release( l );
 }
 
index 3b04518f0e84bfdfb4bf2001f36e90211d0d48d1..7604e56117f92d93193a020f967b1d8fa1c25726 100644 (file)
@@ -403,7 +403,7 @@ void ObjectKillChildrens( vlc_object_t *p_obj )
 
     vlc_list_t *p_list = vlc_list_children( p_obj );
     for( int i = 0; i < p_list->i_count; i++ )
-        ObjectKillChildrens( p_list->p_values[i].p_object );
+        ObjectKillChildrens( p_list->p_values[i].p_address );
     vlc_list_release( p_list );
 }
 
@@ -562,7 +562,7 @@ vlc_list_t *vlc_list_children( vlc_object_t *obj )
         unsigned i = 0;
 
         for (priv = vlc_internals (obj)->first; priv; priv = priv->next)
-            l->p_values[i++].p_object = vlc_object_hold (vlc_externals (priv));
+            l->p_values[i++].p_address = vlc_object_hold (vlc_externals (priv));
     }
     libvlc_unlock (obj->p_libvlc);
     return l;
@@ -697,12 +697,8 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
  *****************************************************************************/
 void vlc_list_release( vlc_list_t *p_list )
 {
-    int i_index;
-
-    for( i_index = 0; i_index < p_list->i_count; i_index++ )
-    {
-        vlc_object_release( p_list->p_values[i_index].p_object );
-    }
+    for( int i = 0; i < p_list->i_count; i++ )
+        vlc_object_release( p_list->p_values[i].p_address );
 
     free( p_list->p_values );
     free( p_list );