mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use Py_uintptr_t for atomic pointers
Issue #26161: Use Py_uintptr_t instead of void* for atomic pointers in pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used. Using void* causes compilation warnings depending on which implementation of atomic types is used.
This commit is contained in:
parent
efb2413ce8
commit
b02ef715a3
3 changed files with 31 additions and 30 deletions
|
@ -30,7 +30,7 @@ typedef enum _Py_memory_order {
|
|||
} _Py_memory_order;
|
||||
|
||||
typedef struct _Py_atomic_address {
|
||||
_Atomic void *_value;
|
||||
atomic_uintptr_t _value;
|
||||
} _Py_atomic_address;
|
||||
|
||||
typedef struct _Py_atomic_int {
|
||||
|
@ -61,7 +61,7 @@ typedef enum _Py_memory_order {
|
|||
} _Py_memory_order;
|
||||
|
||||
typedef struct _Py_atomic_address {
|
||||
void *_value;
|
||||
Py_uintptr_t _value;
|
||||
} _Py_atomic_address;
|
||||
|
||||
typedef struct _Py_atomic_int {
|
||||
|
@ -98,7 +98,7 @@ typedef enum _Py_memory_order {
|
|||
} _Py_memory_order;
|
||||
|
||||
typedef struct _Py_atomic_address {
|
||||
void *_value;
|
||||
Py_uintptr_t _value;
|
||||
} _Py_atomic_address;
|
||||
|
||||
typedef struct _Py_atomic_int {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue