diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-09-16 16:00:51 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-09-17 00:40:09 +0800 |
commit | 775dd4e33c14560fc10cc0ad323163ac3450f959 (patch) | |
tree | c1dbb29a649df9fa391f5deacb975a77e11ff396 /pango | |
parent | 8952c88b75d8ce439397c94e1327641c128e2073 (diff) | |
download | pango-775dd4e33c14560fc10cc0ad323163ac3450f959.tar.gz |
hb-private.h: Fix compilation on newer GLib versions
g_atomic_int_exchange_and_add was deprecated in the GLib gatomic.c rewrite,
for GLib 2.29.6, so use g_atomic_int_add for GLib versions 2.29.5+.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/opentype/hb-private.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/opentype/hb-private.h b/pango/opentype/hb-private.h index 92e514f7..2791b05c 100644 --- a/pango/opentype/hb-private.h +++ b/pango/opentype/hb-private.h @@ -62,7 +62,11 @@ #define hb_be_int32(v) GINT32_FROM_BE (v) typedef int hb_atomic_int_t; +#if !GLIB_CHECK_VERSION(2,29,5) #define hb_atomic_int_fetch_and_add(AI, V) g_atomic_int_exchange_and_add (&(AI), V) +#else +#define hb_atomic_int_fetch_and_add(AI, V) g_atomic_int_add (&(AI), V) +#endif #define hb_atomic_int_get(AI) g_atomic_int_get (&(AI)) #define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V) |