summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-02-11 11:45:48 +0100
committerStefano Karapetsas <[email protected]>2013-02-11 11:45:48 +0100
commit90c877576f3e8d9ba17327e667aadb60bf53012e (patch)
tree2c4d099fdf55d786a2d7ad57bf3c13cbbd2d577c
parent75a2eaf3719c68f9c0ee9227e5d3117f252fa4d4 (diff)
downloadcaja-90c877576f3e8d9ba17327e667aadb60bf53012e.tar.bz2
caja-90c877576f3e8d9ba17327e667aadb60bf53012e.tar.xz
Fix deprecated GStaticMutex
-rw-r--r--libcaja-private/caja-debug-log.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcaja-private/caja-debug-log.c b/libcaja-private/caja-debug-log.c
index 4b18ca80..446df48e 100644
--- a/libcaja-private/caja-debug-log.c
+++ b/libcaja-private/caja-debug-log.c
@@ -40,7 +40,11 @@
#define MAX_URI_COUNT 20
+#if GLIB_CHECK_VERSION(2, 31, 0)
+static GMutex log_mutex;
+#else
static GStaticMutex log_mutex = G_STATIC_MUTEX_INIT;
+#endif
static GHashTable *domains_hash;
static char **ring_buffer;
@@ -54,13 +58,21 @@ static GSList *milestones_tail;
static void
lock (void)
{
+ #if GLIB_CHECK_VERSION(2, 31, 0)
+ g_mutex_lock (&log_mutex);
+ #else
g_static_mutex_lock (&log_mutex);
+ #endif
}
static void
unlock (void)
{
+ #if GLIB_CHECK_VERSION(2, 31, 0)
+ g_mutex_unlock (&log_mutex);
+ #else
g_static_mutex_unlock (&log_mutex);
+ #endif
}
void