From: RĂ©mi Denis-Courmont Date: Tue, 29 Dec 2009 14:09:13 +0000 (+0200) Subject: Remove buggy and never used VLC_VAR_INHERITVALUE X-Git-Tag: 1.1.0-ff~1638 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c85d607420db8a3fc1025c3f4dee268cb533070b;p=vlc Remove buggy and never used VLC_VAR_INHERITVALUE InheritValue() is not thread-safe. It runs under the variable lock of the object creating the new variabe. But it reads variables of parent objects. This would require the variable lock of the parent object. We still need to fix var_Create() with VLC_VAR_DOINHERIT. --- diff --git a/include/vlc_variables.h b/include/vlc_variables.h index 21c32f3ecc..217d7c7472 100644 --- a/include/vlc_variables.h +++ b/include/vlc_variables.h @@ -110,8 +110,6 @@ #define VLC_VAR_GETLIST 0x0025 #define VLC_VAR_CHOICESCOUNT 0x0026 -#define VLC_VAR_INHERITVALUE 0x0030 - #define VLC_VAR_SETISCOMMAND 0x0040 /**@}*/ diff --git a/src/misc/variables.c b/src/misc/variables.c index 7edd00db5a..45d8a24fae 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -627,35 +627,6 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name, p_val->psz_string = p_var->psz_text ? strdup( p_var->psz_text ) : NULL; break; - case VLC_VAR_INHERITVALUE: - { - vlc_value_t val; - - if( InheritValue( p_this, - p_val2 ? p_val2->psz_string : psz_name, - &val, p_var->i_type ) - == VLC_SUCCESS ) - { - /* Duplicate already done */ - - /* Backup needed stuff */ - oldval = p_var->val; - /* Check boundaries and list */ - CheckValue( p_var, &val ); - /* Set the variable */ - p_var->val = val; - /* Free data if needed */ - p_var->ops->pf_free( &oldval ); - } - - if( p_val ) - { - *p_val = p_var->val; - p_var->ops->pf_dup( p_val ); - } - } - break; - case VLC_VAR_SETISCOMMAND: p_var->i_type |= VLC_VAR_ISCOMMAND; break;