]> git.sesse.net Git - vlc/commitdiff
Remove vlc_global()
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 28 Sep 2008 17:33:54 +0000 (20:33 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 28 Sep 2008 17:33:54 +0000 (20:33 +0300)
src/libvlc.h
src/misc/threads.c
src/misc/variables.c
src/misc/win32_specific.c

index fbf1a02671af9fc3aed97df1b38970b5295ca5fa..6ff2e23af1bb12450890de0d5433acec1887aa47 100644 (file)
@@ -146,7 +146,6 @@ __vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
  */
 extern module_bank_t *p_module_bank;
 
-vlc_object_t *vlc_global (void);
 extern char *psz_vlcpath;
 
 /**
index 68472bb2329c633e69ffab9869249118dae34959..3a784a093e0ef11a7c906e10bfb203039a11670c 100644 (file)
@@ -59,12 +59,6 @@ static vlc_threadvar_t cancel_key;
  */
 static vlc_object_t *p_root;
 
-vlc_object_t *vlc_global( void )
-{
-    assert( i_initializations > 0 );
-    return p_root;
-}
-
 #ifdef HAVE_EXECINFO_H
 # include <execinfo.h>
 #endif
@@ -1110,3 +1104,21 @@ void vlc_control_cancel (int cmd, ...)
     va_end (ap);
 #endif
 }
+
+
+#undef var_AcquireMutex
+/**
+ * Finds a process-wide mutex, creates it if needed, and locks it.
+ * Unlock with vlc_mutex_unlock().
+ */
+vlc_mutex_t *var_AcquireMutex( const char *name )
+{
+    vlc_value_t val;
+
+    if( var_Create( p_root, name, VLC_VAR_MUTEX ) )
+        return NULL;
+
+    var_Get( p_root, name, &val );
+    vlc_mutex_lock( val.p_address );
+    return val.p_address;
+}
index 37fcd798f95d21e609cbd110d16a18e86fca1b6f..4a6d8e908d0f5d821a85d9ba77d1cd4f3d09b56d 100644 (file)
@@ -849,25 +849,6 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
 }
 
 
-#undef var_AcquireMutex
-/**
- * Finds a process-wide mutex, creates it if needed, and locks it.
- * Unlock with vlc_mutex_unlock().
- */
-vlc_mutex_t *var_AcquireMutex( const char *name )
-{
-    vlc_object_t *p_global = vlc_global();
-    vlc_value_t val;
-
-    if( var_Create( p_global, name, VLC_VAR_MUTEX ) )
-        return NULL;
-
-    var_Get( p_global, name, &val );
-    vlc_mutex_lock( val.p_address );
-    return val.p_address;
-}
-
-
 /**
  * Register a callback in a variable
  *
index b89eabfefde02700b71548e8b0c4153a920f4518..8daf1fa0a9619c985c2c50cc2ae4672133fd2f1b 100644 (file)
@@ -369,7 +369,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
 void system_End( libvlc_int_t *p_this )
 {
     HWND ipcwindow;
-    if( p_this && vlc_global() )
+    if( p_this )
     {
         free( psz_vlcpath );
         psz_vlcpath = NULL;