Commit 7b1d9b54 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_list_children: use vlc_value_t.p_address, not .p_object

This was a remnant from the times of VLC_VAR_OBJECT.
parent a6b259b7
......@@ -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;
......
......@@ -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);
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment