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

Remove VLC_VAR_MUTEX class

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 3af03657
......@@ -59,7 +59,6 @@
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_TIME 0x0060
#define VLC_VAR_ADDRESS 0x0070
#define VLC_VAR_MUTEX 0x0080
#define VLC_VAR_COORDS 0x00A0
/**@}*/
......
......@@ -75,9 +75,6 @@ static int vlclua_pushvalue( lua_State *L, int i_type, vlc_value_t val, bool b_e
case VLC_VAR_ADDRESS:
vlclua_error( L );
break;
case VLC_VAR_MUTEX:
vlclua_error( L );
break;
default:
vlclua_error( L );
}
......@@ -127,9 +124,6 @@ static int vlclua_tovalue( lua_State *L, int i_type, vlc_value_t *val )
case VLC_VAR_ADDRESS:
vlclua_error( L );
break;
case VLC_VAR_MUTEX:
vlclua_error( L );
break;
default:
vlclua_error( L );
}
......@@ -387,7 +381,6 @@ static int vlclua_add_callback( lua_State *L )
case VLC_VAR_TIME:
break;
case VLC_VAR_ADDRESS:
case VLC_VAR_MUTEX:
default:
return vlclua_error( L );
}
......
......@@ -568,7 +568,6 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
MYCASE( TIME, "time" );
MYCASE( COORDS, "coords" );
MYCASE( ADDRESS, "address" );
MYCASE( MUTEX, "mutex" );
#undef MYCASE
}
printf( " *-o \"%s\" (%s", p_var->psz_name, psz_type );
......@@ -584,7 +583,6 @@ static void DumpVariable (const void *data, const VISIT which, const int depth)
switch( p_var->i_type & VLC_VAR_CLASS )
{
case VLC_VAR_VOID:
case VLC_VAR_MUTEX:
break;
case VLC_VAR_BOOL:
printf( ": %s", p_var->val.b_bool ? "true" : "false" );
......
......@@ -91,7 +91,6 @@ static void DupString( vlc_value_t *p_val )
static void FreeDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ }
static void FreeString( vlc_value_t *p_val ) { free( p_val->psz_string ); }
static void FreeMutex( vlc_value_t *p_val ) { vlc_mutex_destroy( (vlc_mutex_t*)p_val->p_address ); free( p_val->p_address ); }
static void FreeList( vlc_value_t *p_val )
{
......@@ -103,9 +102,6 @@ static void FreeList( vlc_value_t *p_val )
case VLC_VAR_STRING:
FreeString( &p_val->p_list->p_values[i] );
break;
case VLC_VAR_MUTEX:
FreeMutex( &p_val->p_list->p_values[i] );
break;
default:
break;
}
......@@ -125,7 +121,6 @@ addr_ops = { CmpAddress, DupDummy, FreeDummy, },
bool_ops = { CmpBool, DupDummy, FreeDummy, },
float_ops = { CmpFloat, DupDummy, FreeDummy, },
int_ops = { CmpInt, DupDummy, FreeDummy, },
mutex_ops = { CmpAddress, DupDummy, FreeMutex, },
string_ops = { CmpString, DupString, FreeString, },
time_ops = { CmpTime, DupDummy, FreeDummy, },
coords_ops = { NULL, DupDummy, FreeDummy, };
......@@ -249,11 +244,6 @@ int var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
p_var->ops = &addr_ops;
p_var->val.p_address = NULL;
break;
case VLC_VAR_MUTEX:
p_var->ops = &mutex_ops;
p_var->val.p_address = malloc( sizeof(vlc_mutex_t) );
vlc_mutex_init( (vlc_mutex_t*)p_var->val.p_address );
break;
default:
p_var->ops = &void_ops;
#ifndef NDEBUG
......
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