Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c3e57fc3
Commit
c3e57fc3
authored
Feb 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
42d12db0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
basetsd.h
include/basetsd.h
+22
-10
No files found.
include/basetsd.h
View file @
c3e57fc3
...
@@ -165,6 +165,17 @@ static inline long HandleToLong(const void *h)
...
@@ -165,6 +165,17 @@ static inline long HandleToLong(const void *h)
return
(
long
)(
LONG_PTR
)
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
#else
static
inline
unsigned
HandleToULong
(
const
void
*
h
)
static
inline
unsigned
HandleToULong
(
const
void
*
h
)
...
@@ -177,26 +188,27 @@ static inline int HandleToLong(const void *h)
...
@@ -177,26 +188,27 @@ static inline int HandleToLong(const void *h)
return
(
int
)(
LONG_PTR
)
h
;
return
(
int
)(
LONG_PTR
)
h
;
}
}
#endif
/* !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) */
static
inline
unsigned
PtrToUlong
(
const
void
*
p
)
static
inline
void
*
ULongToHandle
(
ULONG32
ul
)
{
{
return
(
void
*
)(
ULONG_PTR
)
ul
;
return
(
unsigned
)(
ULONG_PTR
)
p
;
}
}
static
inline
void
*
LongToHandle
(
LONG32
l
)
static
inline
int
PtrToLong
(
const
void
*
p
)
{
{
return
(
void
*
)(
LONG_PTR
)
l
;
return
(
int
)(
LONG_PTR
)
p
;
}
}
static
inline
ULONG32
PtrToUlong
(
const
void
*
p
)
#endif
/* !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) */
static
inline
void
*
ULongToHandle
(
ULONG32
ul
)
{
{
return
(
ULONG32
)(
ULONG_PTR
)
p
;
return
(
void
*
)(
ULONG_PTR
)
ul
;
}
}
static
inline
LONG32
PtrToLong
(
const
void
*
p
)
static
inline
void
*
LongToHandle
(
LONG32
l
)
{
{
return
(
LONG32
)(
LONG_PTR
)
p
;
return
(
void
*
)(
LONG_PTR
)
l
;
}
}
static
inline
UINT32
PtrToUint
(
const
void
*
p
)
static
inline
UINT32
PtrToUint
(
const
void
*
p
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment