GStaticMutex is deprecated

pull/1/head
Behdad Esfahbod 13 years ago
parent 5e113a4b79
commit 49f8e0cd9a
  1. 9
      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 <glib.h>
#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)

Loading…
Cancel
Save