From b0b06b0002fc9eb14f2a151796d547543bec6b9b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 22 Aug 2007 00:18:58 +0000 Subject: [PATCH] add more PA_PTR_TO_XXX macros git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1682 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/macro.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h index fe944ae..efd0f5e 100644 --- a/src/pulsecore/macro.h +++ b/src/pulsecore/macro.h @@ -76,7 +76,14 @@ static inline size_t pa_align(size_t l) { #define PA_PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p)) #define PA_UINT_TO_PTR(u) ((void*) (unsigned long) (u)) + #define PA_PTR_TO_UINT32(p) ((uint32_t) PA_PTR_TO_UINT(p)) -#define PA_UINT32_TO_PTR(u) PA_UINT_TO_PTR(u) +#define PA_UINT32_TO_PTR(u) PA_UINT_TO_PTR((uint32_t) u) + +#define PA_PTR_TO_INT(p) ((int) PA_PTR_TO_UINT(p)) +#define PA_INT_TO_PTR(u) PA_UINT_TO_PTR((int) u) + +#define PA_PTR_TO_INT32(p) ((int32_t) PA_PTR_TO_UINT(p)) +#define PA_INT32_TO_PTR(u) PA_UINT_TO_PTR((int32_t) u) #endif -- 2.7.4