[vlc-commits] Remove VLC_VAR_MUTEX class

Rémi Denis-Courmont git at videolan.org
Thu Jul 21 16:51:00 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 21 17:35:00 2011 +0300| [e3133936d68e8ef0170b4e8fcdb676e4c06d5ae7] | committer: Rémi Denis-Courmont

Remove VLC_VAR_MUTEX class

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 include/vlc_variables.h      |    1 -
 modules/lua/libs/variables.c |    7 -------
 src/misc/objects.c           |    2 --
 src/misc/variables.c         |   10 ----------
 4 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 3abbdbc..6d095c3 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -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
 /**@}*/
 
diff --git a/modules/lua/libs/variables.c b/modules/lua/libs/variables.c
index 1e6e409..40f4238 100644
--- a/modules/lua/libs/variables.c
+++ b/modules/lua/libs/variables.c
@@ -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 );
     }
diff --git a/src/misc/objects.c b/src/misc/objects.c
index c470f3f..76612b4 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -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" );
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 3a406e7..4e7fe09 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -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



More information about the vlc-commits mailing list