user32: Consolidate the handle conversion macros into one place.
Michael Stefaniuc
mstefani at redhat.de
Sun Feb 22 16:45:41 CST 2009
---
dlls/user32/user16.c | 7 -------
dlls/user32/user_private.h | 2 ++
dlls/user32/wnd16.c | 4 ----
3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/dlls/user32/user16.c b/dlls/user32/user16.c
index 64a160f..4b797ff 100644
--- a/dlls/user32/user16.c
+++ b/dlls/user32/user16.c
@@ -37,13 +37,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(user);
-/* handle to handle 16 conversions */
-#define HANDLE_16(h32) (LOWORD(h32))
-
-/* handle16 to handle conversions */
-#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
-#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
-
#define IS_MENU_STRING_ITEM(flags) \
(((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR)) == MF_STRING)
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index f1a6585..da5a0ce 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -306,10 +306,12 @@ extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg,
extern int SPY_Init(void) DECLSPEC_HIDDEN;
/* HANDLE16 <-> HANDLE conversions */
+#define HANDLE_16(h32) (LOWORD(h32))
#define HCURSOR_16(h32) (LOWORD(h32))
#define HICON_16(h32) (LOWORD(h32))
#define HINSTANCE_16(h32) (LOWORD(h32))
+#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
#define HCURSOR_32(h16) ((HCURSOR)(ULONG_PTR)(h16))
#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
diff --git a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c
index 1f7b0b0..eb01be8 100644
--- a/dlls/user32/wnd16.c
+++ b/dlls/user32/wnd16.c
@@ -23,10 +23,6 @@
#include "win.h"
#include "user_private.h"
-/* handle <--> handle16 conversions */
-#define HANDLE_16(h32) (LOWORD(h32))
-#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
-
static HWND16 hwndSysModal;
struct wnd_enum_info
--
1.6.2.rc1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090222/f8592b8b/attachment.pgp
More information about the wine-patches
mailing list