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

Remove vlc_global()

parent 75ba8eb9
...@@ -146,7 +146,6 @@ __vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type, ...@@ -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; extern module_bank_t *p_module_bank;
vlc_object_t *vlc_global (void);
extern char *psz_vlcpath; extern char *psz_vlcpath;
/** /**
......
...@@ -59,12 +59,6 @@ static vlc_threadvar_t cancel_key; ...@@ -59,12 +59,6 @@ static vlc_threadvar_t cancel_key;
*/ */
static vlc_object_t *p_root; static vlc_object_t *p_root;
vlc_object_t *vlc_global( void )
{
assert( i_initializations > 0 );
return p_root;
}
#ifdef HAVE_EXECINFO_H #ifdef HAVE_EXECINFO_H
# include <execinfo.h> # include <execinfo.h>
#endif #endif
...@@ -1110,3 +1104,21 @@ void vlc_control_cancel (int cmd, ...) ...@@ -1110,3 +1104,21 @@ void vlc_control_cancel (int cmd, ...)
va_end (ap); va_end (ap);
#endif #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;
}
...@@ -849,25 +849,6 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val ) ...@@ -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 * Register a callback in a variable
* *
......
...@@ -369,7 +369,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, ...@@ -369,7 +369,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
void system_End( libvlc_int_t *p_this ) void system_End( libvlc_int_t *p_this )
{ {
HWND ipcwindow; HWND ipcwindow;
if( p_this && vlc_global() ) if( p_this )
{ {
free( psz_vlcpath ); free( psz_vlcpath );
psz_vlcpath = NULL; psz_vlcpath = NULL;
......
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