summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-06 20:47:26 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-06 20:47:26 (GMT)
commitca4706399879b30e952c402637b4fc0d4d2e661c (patch)
tree72f97b545d4d31afd06a8874fcbb578cb178aa0d /Include
parent3c397e4c39430000348f2f64d9e394bf1b61c509 (diff)
downloadcpython-ca4706399879b30e952c402637b4fc0d4d2e661c.zip
cpython-ca4706399879b30e952c402637b4fc0d4d2e661c.tar.gz
cpython-ca4706399879b30e952c402637b4fc0d4d2e661c.tar.bz2
replace Py_(u)intptr_t with the c99 standard types
Diffstat (limited to 'Include')
-rw-r--r--Include/pyatomic.h4
-rw-r--r--Include/pymacro.h8
-rw-r--r--Include/pymem.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/Include/pyatomic.h b/Include/pyatomic.h
index 89028ef..893d30d 100644
--- a/Include/pyatomic.h
+++ b/Include/pyatomic.h
@@ -61,7 +61,7 @@ typedef enum _Py_memory_order {
} _Py_memory_order;
typedef struct _Py_atomic_address {
- Py_uintptr_t _value;
+ 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 {
- Py_uintptr_t _value;
+ uintptr_t _value;
} _Py_atomic_address;
typedef struct _Py_atomic_int {
diff --git a/Include/pymacro.h b/Include/pymacro.h
index 49929e5..d1345c4 100644
--- a/Include/pymacro.h
+++ b/Include/pymacro.h
@@ -79,12 +79,12 @@
#define _Py_SIZE_ROUND_UP(n, a) (((size_t)(n) + \
(size_t)((a) - 1)) & ~(size_t)((a) - 1))
/* Round pointer "p" down to the closest "a"-aligned address <= "p". */
-#define _Py_ALIGN_DOWN(p, a) ((void *)((Py_uintptr_t)(p) & ~(Py_uintptr_t)((a) - 1)))
+#define _Py_ALIGN_DOWN(p, a) ((void *)((uintptr_t)(p) & ~(uintptr_t)((a) - 1)))
/* Round pointer "p" up to the closest "a"-aligned address >= "p". */
-#define _Py_ALIGN_UP(p, a) ((void *)(((Py_uintptr_t)(p) + \
- (Py_uintptr_t)((a) - 1)) & ~(Py_uintptr_t)((a) - 1)))
+#define _Py_ALIGN_UP(p, a) ((void *)(((uintptr_t)(p) + \
+ (uintptr_t)((a) - 1)) & ~(uintptr_t)((a) - 1)))
/* Check if pointer "p" is aligned to "a"-bytes boundary. */
-#define _Py_IS_ALIGNED(p, a) (!((Py_uintptr_t)(p) & (Py_uintptr_t)((a) - 1)))
+#define _Py_IS_ALIGNED(p, a) (!((uintptr_t)(p) & (uintptr_t)((a) - 1)))
#ifdef __GNUC__
#define Py_UNUSED(name) _unused_ ## name __attribute__((unused))
diff --git a/Include/pymem.h b/Include/pymem.h
index 431e5b6..ce63bf8 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -37,7 +37,7 @@ typedef unsigned int _PyTraceMalloc_domain_t;
If memory block is already tracked, update the existing trace. */
PyAPI_FUNC(int) _PyTraceMalloc_Track(
_PyTraceMalloc_domain_t domain,
- Py_uintptr_t ptr,
+ uintptr_t ptr,
size_t size);
/* Untrack an allocated memory block in the tracemalloc module.
@@ -46,7 +46,7 @@ PyAPI_FUNC(int) _PyTraceMalloc_Track(
Return -2 if tracemalloc is disabled, otherwise return 0. */
PyAPI_FUNC(int) _PyTraceMalloc_Untrack(
_PyTraceMalloc_domain_t domain,
- Py_uintptr_t ptr);
+ uintptr_t ptr);
/* Get the traceback where a memory block was allocated.
@@ -58,7 +58,7 @@ PyAPI_FUNC(int) _PyTraceMalloc_Untrack(
Raise an exception and return NULL on error. */
PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback(
_PyTraceMalloc_domain_t domain,
- Py_uintptr_t ptr);
+ uintptr_t ptr);
#endif /* !Py_LIMITED_API */