diff options
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r-- | src/shared/macro.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h index 70c5fb50a7..5619c32e45 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -241,6 +241,9 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { #define PTR_TO_UINT64(p) ((uint64_t) ((uintptr_t) (p))) #define UINT64_TO_PTR(u) ((void *) ((uintptr_t) (u))) +#define PTR_TO_SIZE(p) ((size_t) ((uintptr_t) (p))) +#define SIZE_TO_PTR(u) ((void *) ((uintptr_t) (u))) + #define memzero(x,l) (memset((x), 0, (l))) #define zero(x) (memzero(&(x), sizeof(x))) |