]> git.sesse.net Git - vlc/commitdiff
No need to use vlc_global here.
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 21 May 2007 14:50:52 +0000 (14:50 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 21 May 2007 14:50:52 +0000 (14:50 +0000)
src/libvlc-common.c

index 9f78e0b2729afce243da00810309c6e28a5c0b22..f5137dad25bade7b99a6e2423deb8813bf68efc2 100644 (file)
@@ -94,7 +94,7 @@
  * The evil global variable. We handle it with care, don't worry.
  *****************************************************************************/
 static libvlc_global_data_t   libvlc_global;
-static libvlc_global_data_t * p_libvlc_global = NULL;
+#define p_libvlc_global (&libvlc_global)
 static libvlc_int_t *    p_static_vlc = NULL;
 static volatile unsigned int i_instances = 0;
 
@@ -153,9 +153,11 @@ libvlc_int_t * libvlc_InternalCreate( void )
     vlc_value_t lockval;
     char *psz_env = NULL;
 
+#if 0
     /* &libvlc_global never changes,
      * so we can safely call this multiple times. */
     p_libvlc_global = &libvlc_global;
+#endif
 
     /* vlc_threads_init *must* be the first internal call! No other call is
      * allowed before the thread system has been initialized. */
@@ -1196,7 +1198,7 @@ static inline int LoadMessages (void)
 #else
     char psz_path[1024];
     if (snprintf (psz_path, sizeof (psz_path), "%s/%s",
-                  vlc_global( &libvlc_global )->psz_vlcpath, "locale")
+                  libvlc_global.psz_vlcpath, "locale")
                      >= (int)sizeof (psz_path))
         return -1;