]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134875: Fix mimallc build error for the old compilers (gh-134994)
authorDonghee Na <donghee.na@python.org>
Mon, 2 Jun 2025 23:40:40 +0000 (08:40 +0900)
committerGitHub <noreply@github.com>
Mon, 2 Jun 2025 23:40:40 +0000 (08:40 +0900)
Include/internal/mimalloc/mimalloc/internal.h

index 71b7ea702d6c5e8d1cb738081bfcea57baf268d3..a7daa3a40a4c0bc303772ca2914f15287027f344 100644 (file)
@@ -634,10 +634,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
   mi_track_mem_defined(block,sizeof(mi_block_t));
   mi_block_t* next;
   #ifdef MI_ENCODE_FREELIST
-  next = (mi_block_t*)mi_ptr_decode(null, mi_atomic_load_relaxed(&block->next), keys);
+  next = (mi_block_t*)mi_ptr_decode(null, mi_atomic_load_relaxed((_Atomic(mi_encoded_t)*)&block->next), keys);
   #else
   MI_UNUSED(keys); MI_UNUSED(null);
-  next = (mi_block_t*)mi_atomic_load_relaxed(&block->next);
+  next = (mi_block_t*)mi_atomic_load_relaxed((_Atomic(mi_encoded_t)*)&block->next);
   #endif
   mi_track_mem_noaccess(block,sizeof(mi_block_t));
   return next;