gh-110024: Fix Pointer Type Warnings (gh-110053)

The warnings were introduced by gh-109794 (for gh-109793).
This commit is contained in:
Eric Snow 2023-09-29 09:20:23 -06:00 committed by GitHub
parent 9c73a9acec
commit 6364873d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 8 deletions

View File

@ -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