]> git.sesse.net Git - vlc/commitdiff
Remove duplicated variable callback code
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 5 Jan 2009 17:36:55 +0000 (19:36 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 5 Jan 2009 17:36:55 +0000 (19:36 +0200)
include/vlc_variables.h
src/misc/variables.c

index 0a41df91364e3f32b54d3c1ae093778ea15495a0..0641d0808b8a95b55e25c1edac225ad5594b6ed0 100644 (file)
 #define VLC_VAR_CHOICESCOUNT        0x0028
 
 #define VLC_VAR_INHERITVALUE        0x0030
-#define VLC_VAR_TRIGGER_CALLBACKS   0x0035
 
 #define VLC_VAR_SETISCOMMAND        0x0040
 /**@}*/
index ed2b916b95f02a1fcde6fc79bc23d20d0437154a..0d647a674ed84cdee3a18651833b3e0de689816a 100644 (file)
@@ -656,41 +656,6 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
                 }
             }
             break;
-        case VLC_VAR_TRIGGER_CALLBACKS:
-            {
-                /* Deal with callbacks. Tell we're in a callback, release the lock,
-                 * call stored functions, retake the lock. */
-                if( p_var->i_entries )
-                {
-                    int i_var;
-                    int i_entries = p_var->i_entries;
-                    callback_entry_t *p_entries = p_var->p_entries;
-
-                    p_var->b_incallback = true;
-                    vlc_mutex_unlock( &p_priv->var_lock );
-
-                    /* The real calls */
-                    for( ; i_entries-- ; )
-                    {
-                        p_entries[i_entries].pf_callback( p_this, psz_name, p_var->val, p_var->val,
-                                                          p_entries[i_entries].p_data );
-                    }
-
-                    vlc_mutex_lock( &p_priv->var_lock );
-
-                    i_var = Lookup( p_priv->p_vars, p_priv->i_vars, psz_name );
-                    if( i_var < 0 )
-                    {
-                        msg_Err( p_this, "variable %s has disappeared", psz_name );
-                        vlc_mutex_unlock( &p_priv->var_lock );
-                        return VLC_ENOVAR;
-                    }
-
-                    p_var = &p_priv->p_vars[i_var];
-                    p_var->b_incallback = false;
-                }
-            }
-            break;
 
         case VLC_VAR_SETISCOMMAND:
             p_var->i_type |= VLC_VAR_ISCOMMAND;