[glib] thread: hide g_static_rec_mutex_get_rec_mutex_impl



commit b7f05063710ff5bfd0e7f3722687eb63c0709ac3
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Oct 12 18:27:06 2011 -0400

    thread: hide g_static_rec_mutex_get_rec_mutex_impl
    
    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 |    2 +-
 glib/gconvert.c                      |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c
index 46d8b85..45cb911 100644
--- a/glib/deprecated/gthread-deprecated.c
+++ b/glib/deprecated/gthread-deprecated.c
@@ -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;
diff --git a/glib/gconvert.c b/glib/gconvert.c
index d3f2049..21e8c1f 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]