From c48a21215b1a3f447b71bb29b748d5a57b462d99 Mon Sep 17 00:00:00 2001 From: daanx Date: Sat, 18 May 2024 16:41:39 -0700 Subject: [PATCH] fix arm64 windows compilation, upstream of python/cpython#111527 --- include/mimalloc/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mimalloc/atomic.h b/include/mimalloc/atomic.h index afd8d647..d5333dd9 100644 --- a/include/mimalloc/atomic.h +++ b/include/mimalloc/atomic.h @@ -201,7 +201,7 @@ static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_ #else uintptr_t x = *p; if (mo > mi_memory_order_relaxed) { - while (!mi_atomic_compare_exchange_weak_explicit(p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ }; + while (!mi_atomic_compare_exchange_weak_explicit((_Atomic(uintptr_t)*)p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ }; } return x; #endif