From 49f8e0cd9a5493ae26857c43bac0711cdf47c80d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 16 Jun 2012 15:40:03 -0400 Subject: [PATCH] GStaticMutex is deprecated --- src/hb-mutex-private.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh index f9bd679f2..8efd27efe 100644 --- a/src/hb-mutex-private.hh +++ b/src/hb-mutex-private.hh @@ -67,12 +67,21 @@ typedef pthread_mutex_t hb_mutex_impl_t; #elif !defined(HB_NO_MT) && defined(HAVE_GLIB) #include +#if !GLIB_CHECK_VERSION(2,32,0) typedef GStaticMutex hb_mutex_impl_t; #define HB_MUTEX_IMPL_INIT G_STATIC_MUTEX_INIT #define hb_mutex_impl_init(M) g_static_mutex_init (M) #define hb_mutex_impl_lock(M) g_static_mutex_lock (M) #define hb_mutex_impl_unlock(M) g_static_mutex_unlock (M) #define hb_mutex_impl_finish(M) g_static_mutex_free (M) +#else +typedef GMutex hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT {0} +#define hb_mutex_impl_init(M) g_mutex_init (M) +#define hb_mutex_impl_lock(M) g_mutex_lock (M) +#define hb_mutex_impl_unlock(M) g_mutex_unlock (M) +#define hb_mutex_impl_finish(M) g_mutex_clear (M) +#endif #elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)