summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-01-22 13:09:55 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-01-22 13:09:55 (GMT)
commitb02ef715a303ab09a39ef994d8f5acc4eb572376 (patch)
treeda38e1ff9c638c0dec0bb682bc18b5b6b2d93d93 /Include
parentefb2413ce82acaa5dec43a8cb14aa7cdf2352fb1 (diff)
downloadcpython-b02ef715a303ab09a39ef994d8f5acc4eb572376.zip
cpython-b02ef715a303ab09a39ef994d8f5acc4eb572376.tar.gz
cpython-b02ef715a303ab09a39ef994d8f5acc4eb572376.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/pyatomic.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/pyatomic.h b/Include/pyatomic.h
index 892a217..89028ef 100644
--- a/Include/pyatomic.h
+++ b/Include/pyatomic.h
@@ -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 {