From 42d518513c683fd5e932898ceec891c3003d75e1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Oct 2017 00:25:11 -0600 Subject: [PATCH] Towards compiling with pre-C++11 compilers and nullptr fallback https://github.com/behdad/harfbuzz/issues/585 --- src/hb-atomic-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 2d56757..9343840 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -89,9 +89,9 @@ typedef int32_t hb_atomic_int_impl_t; #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else #if __ppc64__ || __x86_64__ || __aarch64__ -#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (void *) (O), (int64_t) (void *) (N), (int64_t*) (P)) #else -#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((int32_t) (void *) (O), (int32_t) (void *) (N), (int32_t*) (P)) #endif #endif -- 2.7.4