Commit f2e0c5ca authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

include: Define HandleToU?Long to return a long (as SDK does).

parent bb1fc335
...@@ -153,16 +153,32 @@ typedef unsigned int UHALF_PTR, *PUHALF_PTR; ...@@ -153,16 +153,32 @@ typedef unsigned int UHALF_PTR, *PUHALF_PTR;
#if !defined(__midl) && !defined(__WIDL__) #if !defined(__midl) && !defined(__WIDL__)
static inline ULONG32 HandleToULong(const void *h) #if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
static inline unsigned long HandleToULong(const void *h)
{
return (unsigned long)(ULONG_PTR)h;
}
static inline long HandleToLong(const void *h)
{
return (long)(LONG_PTR)h;
}
#else
static inline unsigned HandleToULong(const void *h)
{ {
return (ULONG32)(ULONG_PTR)h; return (unsigned)(ULONG_PTR)h;
} }
static inline LONG32 HandleToLong(const void *h) static inline int HandleToLong(const void *h)
{ {
return (LONG32)(LONG_PTR)h; return (int)(LONG_PTR)h;
} }
#endif /* !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) */
static inline void *ULongToHandle(ULONG32 ul) static inline void *ULongToHandle(ULONG32 ul)
{ {
return (void *)(ULONG_PTR)ul; return (void *)(ULONG_PTR)ul;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment