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)
commit244e12088dfdb456c48acfcece584f3d55ad9c72 (patch)
tree0cefe0cf5cfca5a6fe99567e76a733563c5f6775 /Include
parent4b8b86c6d57f630763ace512bfc302fb0c2b55f8 (diff)
downloadcpython-244e12088dfdb456c48acfcece584f3d55ad9c72.zip
cpython-244e12088dfdb456c48acfcece584f3d55ad9c72.tar.gz
cpython-244e12088dfdb456c48acfcece584f3d55ad9c72.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 {