diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-26 18:37:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 18:37:28 (GMT) |
commit | 64c4139f61517cb8845b42fce0a1dad0e6ebbd9a (patch) | |
tree | 0fa5d61578fbbda76cd1e79e00770c6ad985c1f0 | |
parent | bdcc738fec377a9936d21899b08129374fe3cc7b (diff) | |
download | cpython-64c4139f61517cb8845b42fce0a1dad0e6ebbd9a.zip cpython-64c4139f61517cb8845b42fce0a1dad0e6ebbd9a.tar.gz cpython-64c4139f61517cb8845b42fce0a1dad0e6ebbd9a.tar.bz2 |
[3.13] gh-120593: Fix const qualifier in pyatomic.h (GH-121055) (#121057)
gh-120593: Fix const qualifier in pyatomic.h (GH-121055)
(cherry picked from commit 9cd2dcbb87fb3c35d8ca3554d9472ac283f62a64)
Co-authored-by: Victor Stinner <vstinner@python.org>
-rw-r--r-- | Include/cpython/pyatomic_gcc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/cpython/pyatomic_gcc.h b/Include/cpython/pyatomic_gcc.h index c0f3747..f2ebdee 100644 --- a/Include/cpython/pyatomic_gcc.h +++ b/Include/cpython/pyatomic_gcc.h @@ -297,7 +297,7 @@ _Py_atomic_load_ssize(const Py_ssize_t *obj) static inline void * _Py_atomic_load_ptr(const void *obj) -{ return (void *)__atomic_load_n((void **)obj, __ATOMIC_SEQ_CST); } +{ return (void *)__atomic_load_n((void * const *)obj, __ATOMIC_SEQ_CST); } // --- _Py_atomic_load_relaxed ----------------------------------------------- @@ -356,7 +356,7 @@ _Py_atomic_load_ssize_relaxed(const Py_ssize_t *obj) static inline void * _Py_atomic_load_ptr_relaxed(const void *obj) -{ return (void *)__atomic_load_n((const void **)obj, __ATOMIC_RELAXED); } +{ return (void *)__atomic_load_n((void * const *)obj, __ATOMIC_RELAXED); } static inline unsigned long long _Py_atomic_load_ullong_relaxed(const unsigned long long *obj) @@ -490,11 +490,11 @@ _Py_atomic_store_ullong_relaxed(unsigned long long *obj, static inline void * _Py_atomic_load_ptr_acquire(const void *obj) -{ return (void *)__atomic_load_n((void **)obj, __ATOMIC_ACQUIRE); } +{ return (void *)__atomic_load_n((void * const *)obj, __ATOMIC_ACQUIRE); } static inline uintptr_t _Py_atomic_load_uintptr_acquire(const uintptr_t *obj) -{ return (uintptr_t)__atomic_load_n((uintptr_t *)obj, __ATOMIC_ACQUIRE); } +{ return (uintptr_t)__atomic_load_n(obj, __ATOMIC_ACQUIRE); } static inline void _Py_atomic_store_ptr_release(void *obj, void *value) |