Commit 9747349a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove last use of FIND_ANYWHERE

parent b0b4694b
...@@ -173,9 +173,9 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length, ...@@ -173,9 +173,9 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
/* TODO: should be in src/libvlc.c */ /* TODO: should be in src/libvlc.c */
int canc = vlc_savecancel (); int canc = vlc_savecancel ();
var_Create (obj, "tree", VLC_VAR_STRING | VLC_VAR_ISCOMMAND); var_Create (obj, "tree", VLC_VAR_STRING | VLC_VAR_ISCOMMAND);
var_AddCallback (obj, "tree", DumpCommand, NULL); var_AddCallback (obj, "tree", DumpCommand, obj);
var_Create (obj, "vars", VLC_VAR_STRING | VLC_VAR_ISCOMMAND); var_Create (obj, "vars", VLC_VAR_STRING | VLC_VAR_ISCOMMAND);
var_AddCallback (obj, "vars", DumpCommand, NULL); var_AddCallback (obj, "vars", DumpCommand, obj);
vlc_restorecancel (canc); vlc_restorecancel (canc);
} }
...@@ -648,18 +648,15 @@ static void DumpVariable (const void *data, const VISIT which, const int depth) ...@@ -648,18 +648,15 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd, static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
{ {
(void)oldval; (void)p_data; (void)oldval;
vlc_object_t *p_object = NULL; vlc_object_t *p_object = NULL;
if( *newval.psz_string ) if( *newval.psz_string )
{ {
/* try using the object's name to find it */ /* try using the object's name to find it */
p_object = vlc_object_find_name( p_this, newval.psz_string, p_object = vlc_object_find_name( p_data, newval.psz_string, FIND_CHILD );
FIND_ANYWHERE );
if( !p_object ) if( !p_object )
{
return VLC_ENOOBJ; return VLC_ENOOBJ;
}
} }
libvlc_lock (p_this->p_libvlc); libvlc_lock (p_this->p_libvlc);
......
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