[libsoup] Update for GStaticMutex deprecation in glib master



commit e76cec8a26846814f5ff7d84193a5221bc7f1b88
Author: Dan Winship <danw gnome org>
Date:   Thu Sep 29 09:50:21 2011 -0400

    Update for GStaticMutex deprecation in glib master
    
    Instead of using GStaticMutex directly, use the G_LOCK macros, which
    use GStaticMutex on older glibs and GMutex on newer glibs.

 libsoup/soup-message-headers.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index 9a2c22e..1d98bb9 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -528,7 +528,7 @@ soup_message_headers_foreach (SoupMessageHeaders *hdrs,
 }
 
 
-static GStaticMutex header_pool_mutex = G_STATIC_MUTEX_INIT;
+G_LOCK_DEFINE_STATIC (header_pool);
 static GHashTable *header_pool, *header_setters;
 
 static void transfer_encoding_setter (SoupMessageHeaders *, const char *);
@@ -555,7 +555,7 @@ intern_header_name (const char *name, SoupHeaderSetter *setter)
 {
 	const char *interned;
 
-	g_static_mutex_lock (&header_pool_mutex);
+	G_LOCK (header_pool);
 
 	if (!header_pool) {
 		header_pool = g_hash_table_new (soup_str_case_hash, soup_str_case_equal);
@@ -578,7 +578,7 @@ intern_header_name (const char *name, SoupHeaderSetter *setter)
 	if (setter)
 		*setter = g_hash_table_lookup (header_setters, interned);
 
-	g_static_mutex_unlock (&header_pool_mutex);
+	G_UNLOCK (header_pool);
 	return interned;
 }
 



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