include/basetsd.h: Define PtrTo(Ul|L)ong to return a long (as SDK does).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
42d12db0ee
commit
c3e57fc3e4
|
@ -165,6 +165,17 @@ static inline long HandleToLong(const void *h)
|
|||
return (long)(LONG_PTR)h;
|
||||
}
|
||||
|
||||
static inline unsigned long PtrToUlong(const void *p)
|
||||
{
|
||||
return (unsigned long)(ULONG_PTR)p;
|
||||
}
|
||||
|
||||
static inline long PtrToLong(const void *p)
|
||||
{
|
||||
return (long)(LONG_PTR)p;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
static inline unsigned HandleToULong(const void *h)
|
||||
|
@ -177,6 +188,17 @@ static inline int HandleToLong(const void *h)
|
|||
return (int)(LONG_PTR)h;
|
||||
}
|
||||
|
||||
static inline unsigned PtrToUlong(const void *p)
|
||||
{
|
||||
return (unsigned)(ULONG_PTR)p;
|
||||
}
|
||||
|
||||
static inline int PtrToLong(const void *p)
|
||||
{
|
||||
return (int)(LONG_PTR)p;
|
||||
}
|
||||
|
||||
|
||||
#endif /* !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) */
|
||||
|
||||
static inline void *ULongToHandle(ULONG32 ul)
|
||||
|
@ -189,16 +211,6 @@ static inline void *LongToHandle(LONG32 l)
|
|||
return (void *)(LONG_PTR)l;
|
||||
}
|
||||
|
||||
static inline ULONG32 PtrToUlong(const void *p)
|
||||
{
|
||||
return (ULONG32)(ULONG_PTR)p;
|
||||
}
|
||||
|
||||
static inline LONG32 PtrToLong(const void *p)
|
||||
{
|
||||
return (LONG32)(LONG_PTR)p;
|
||||
}
|
||||
|
||||
static inline UINT32 PtrToUint(const void *p)
|
||||
{
|
||||
return (UINT32)(UINT_PTR)p;
|
||||
|
|
Loading…
Reference in New Issue