mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
replace Py_(u)intptr_t with the c99 standard types
This commit is contained in:
parent
3c397e4c39
commit
ca47063998
21 changed files with 86 additions and 86 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue