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:
Victor Stinner 2016-01-22 14:09:55 +01:00
parent efb2413ce8
commit b02ef715a3
3 changed files with 31 additions and 30 deletions

View file

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