[vlc-devel] commit: Remove duplicated variable callback code ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 5 18:38:41 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Jan  5 19:36:55 2009 +0200| [a235278d98ff677f7c520a00dbf461750a77fe01] | committer: Rémi Denis-Courmont 

Remove duplicated variable callback code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a235278d98ff677f7c520a00dbf461750a77fe01
---

 include/vlc_variables.h |    1 -
 src/misc/variables.c    |   35 -----------------------------------
 2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 0a41df9..0641d08 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -111,7 +111,6 @@
 #define VLC_VAR_CHOICESCOUNT        0x0028
 
 #define VLC_VAR_INHERITVALUE        0x0030
-#define VLC_VAR_TRIGGER_CALLBACKS   0x0035
 
 #define VLC_VAR_SETISCOMMAND        0x0040
 /**@}*/
diff --git a/src/misc/variables.c b/src/misc/variables.c
index ed2b916..0d647a6 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -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;




More information about the vlc-devel mailing list