*/
extern module_bank_t *p_module_bank;
-vlc_object_t *vlc_global (void);
extern char *psz_vlcpath;
/**
*/
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
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;
+}
}
-#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
*
void system_End( libvlc_int_t *p_this )
{
HWND ipcwindow;
- if( p_this && vlc_global() )
+ if( p_this )
{
free( psz_vlcpath );
psz_vlcpath = NULL;