thread: hide g_static_rec_mutex_get_rec_mutex_impl
authorRyan Lortie <desrt@desrt.ca>
Wed, 12 Oct 2011 22:27:06 +0000 (18:27 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 12 Oct 2011 22:27:06 +0000 (18:27 -0400)
Unlike with GStaticMutex, this function was never part of the pre-2.32
ABI, so we should keep it tucked in.

glib/deprecated/gthread-deprecated.c
glib/gconvert.c

index 46d8b85..45cb911 100644 (file)
@@ -637,7 +637,7 @@ g_static_rec_mutex_init (GStaticRecMutex *mutex)
   *mutex = init_mutex;
 }
 
-GRecMutex *
+static GRecMutex *
 g_static_rec_mutex_get_rec_mutex_impl (GStaticRecMutex* mutex)
 {
   GRecMutex *result;
index d3f2049..21e8c1f 100644 (file)
@@ -1317,14 +1317,14 @@ filename_charset_cache_free (gpointer data)
 gboolean
 g_get_filename_charsets (const gchar ***filename_charsets)
 {
-  static GStaticPrivate cache_private = G_STATIC_PRIVATE_INIT;
-  GFilenameCharsetCache *cache = g_static_private_get (&cache_private);
+  static GPrivate cache_private = G_PRIVATE_INIT (filename_charset_cache_free);
+  GFilenameCharsetCache *cache = g_private_get (&cache_private);
   const gchar *charset;
 
   if (!cache)
     {
       cache = g_new0 (GFilenameCharsetCache, 1);
-      g_static_private_set (&cache_private, cache, filename_charset_cache_free);
+      g_private_set (&cache_private, cache);
     }
 
   g_get_charset (&charset);