Commit 19b91d1b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove old object aliasing code

parent 7d5937b3
...@@ -200,7 +200,7 @@ module_t *vlc_module_load(vlc_object_t *p_this, const char *psz_capability, ...@@ -200,7 +200,7 @@ module_t *vlc_module_load(vlc_object_t *p_this, const char *psz_capability,
vlc_activate_t probe, ...) vlc_activate_t probe, ...)
{ {
int i_shortcuts = 0; int i_shortcuts = 0;
char *psz_shortcuts = NULL, *psz_var = NULL, *psz_alias = NULL; char *psz_shortcuts = NULL, *psz_var = NULL;
bool b_force_backup = p_this->b_force; bool b_force_backup = p_this->b_force;
/* Deal with variables */ /* Deal with variables */
...@@ -271,15 +271,9 @@ module_t *vlc_module_load(vlc_object_t *p_this, const char *psz_capability, ...@@ -271,15 +271,9 @@ module_t *vlc_module_load(vlc_object_t *p_this, const char *psz_capability,
{ {
for( unsigned i = 0; i < p_module->i_shortcuts; i++ ) for( unsigned i = 0; i < p_module->i_shortcuts; i++ )
{ {
char *c; if( !strcasecmp( name, p_module->pp_shortcuts[i] ) )
if( ( c = strchr( name, '@' ) )
? !strncasecmp( name, p_module->pp_shortcuts[i],
c-name )
: !strcasecmp( name, p_module->pp_shortcuts[i] ) )
{ {
/* Found it */ /* Found it */
if( c && c[1] )
psz_alias = c+1;
i_shortcut_bonus = i_short * 10000; i_shortcut_bonus = i_short * 10000;
goto found_shortcut; goto found_shortcut;
} }
...@@ -374,8 +368,7 @@ found_shortcut: ...@@ -374,8 +368,7 @@ found_shortcut:
{ {
msg_Dbg( p_this, "using %s module \"%s\"", msg_Dbg( p_this, "using %s module \"%s\"",
psz_capability, module_get_object(p_module) ); psz_capability, module_get_object(p_module) );
vlc_object_set_name( p_this, psz_alias ? psz_alias vlc_object_set_name( p_this, module_get_object(p_module) );
: module_get_object(p_module) );
} }
else else
msg_Dbg( p_this, "no %s module matching \"%s\" could be loaded", msg_Dbg( p_this, "no %s module matching \"%s\" could be loaded",
......
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