Skip to content

Commit d007c5b

Browse files
vstinneraisk
authored andcommitted
pythongh-90815: Fix mimalloc atomic.h on Windows arm64 (python#111527)
mi_atomic_load_explicit() casts 'p' argument to drop the 'const' qualifier on Windows arm64 platform. Fix the compiler warning: 'function': different 'const' qualifiers (compiling source file ..\Objects\mimalloc\options.c)
1 parent e7f5268 commit d007c5b

File tree

1 file changed

+1
-1
lines changed
  • Include/internal/mimalloc/mimalloc

1 file changed

+1
-1
lines changed

Include/internal/mimalloc/mimalloc/atomic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_
195195
#else
196196
uintptr_t x = *p;
197197
if (mo > mi_memory_order_relaxed) {
198-
while (!mi_atomic_compare_exchange_weak_explicit(p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ };
198+
while (!mi_atomic_compare_exchange_weak_explicit((_Atomic(uintptr_t)*)p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ };
199199
}
200200
return x;
201201
#endif

0 commit comments

Comments
 (0)