mirror of https://github.com/python/cpython
gh-110024: Fix Pointer Type Warnings (gh-110053)
The warnings were introduced by gh-109794 (for gh-109793).
This commit is contained in:
parent
9c73a9acec
commit
6364873d2a
|
@ -506,15 +506,23 @@ static inline void _Py_atomic_fence_release(void);
|
|||
// --- aliases ---------------------------------------------------------------
|
||||
|
||||
#if SIZEOF_LONG == 8
|
||||
# define _Py_atomic_load_ulong _Py_atomic_load_uint64
|
||||
# define _Py_atomic_load_ulong_relaxed _Py_atomic_load_uint64_relaxed
|
||||
# define _Py_atomic_store_ulong _Py_atomic_store_uint64
|
||||
# define _Py_atomic_store_ulong_relaxed _Py_atomic_store_uint64_relaxed
|
||||
# define _Py_atomic_load_ulong(p) \
|
||||
_Py_atomic_load_uint64((uint64_t *)p)
|
||||
# define _Py_atomic_load_ulong_relaxed(p) \
|
||||
_Py_atomic_load_uint64_relaxed((uint64_t *)p)
|
||||
# define _Py_atomic_store_ulong(p, v) \
|
||||
_Py_atomic_store_uint64((uint64_t *)p, v)
|
||||
# define _Py_atomic_store_ulong_relaxed(p, v) \
|
||||
_Py_atomic_store_uint64_relaxed((uint64_t *)p, v)
|
||||
#elif SIZEOF_LONG == 4
|
||||
# define _Py_atomic_load_ulong _Py_atomic_load_uint32
|
||||
# define _Py_atomic_load_ulong_relaxed _Py_atomic_load_uint32_relaxed
|
||||
# define _Py_atomic_store_ulong _Py_atomic_store_uint32
|
||||
# define _Py_atomic_store_ulong_relaxed _Py_atomic_store_uint32_relaxed
|
||||
# define _Py_atomic_load_ulong(p) \
|
||||
_Py_atomic_load_uint32((uint32_t *)p)
|
||||
# define _Py_atomic_load_ulong_relaxed(p) \
|
||||
_Py_atomic_load_uint32_relaxed((uint32_t *)p)
|
||||
# define _Py_atomic_store_ulong(p, v) \
|
||||
_Py_atomic_store_uint32((uint32_t *)p, v)
|
||||
# define _Py_atomic_store_ulong_relaxed(p, v) \
|
||||
_Py_atomic_store_uint32_relaxed((uint32_t *)p, v)
|
||||
#else
|
||||
# error "long must be 4 or 8 bytes in size"
|
||||
#endif // SIZEOF_LONG
|
||||
|
|
Loading…
Reference in New Issue