Alexandre Julliard : user32: Get rid of the EDIT_winproc_handle variable.

Alexandre Julliard julliard at winehq.org
Thu Dec 17 10:37:10 CST 2009


Module: wine
Branch: master
Commit: 87ede8949aa18c67df433f5e16259949bb954a93
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=87ede8949aa18c67df433f5e16259949bb954a93

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Dec 17 12:58:08 2009 +0100

user32: Get rid of the EDIT_winproc_handle variable.

---

 dlls/user32/class.c    |    7 +++----
 dlls/user32/controls.h |    2 --
 dlls/user32/win.c      |    2 +-
 dlls/user32/winproc.c  |    2 --
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/user32/class.c b/dlls/user32/class.c
index f5cdaec..3c211db 100644
--- a/dlls/user32/class.c
+++ b/dlls/user32/class.c
@@ -391,18 +391,17 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local
  * Register a builtin control class.
  * This allows having both ASCII and Unicode winprocs for the same class.
  */
-static WNDPROC register_builtin( const struct builtin_class_descr *descr )
+static void register_builtin( const struct builtin_class_descr *descr )
 {
     CLASS *classPtr;
 
     if (!(classPtr = CLASS_RegisterClass( descr->name, user32_module, FALSE,
-                                          descr->style, 0, descr->extra ))) return 0;
+                                          descr->style, 0, descr->extra ))) return;
 
     classPtr->hCursor       = LoadCursorA( 0, (LPSTR)descr->cursor );
     classPtr->hbrBackground = descr->brush;
     classPtr->winproc       = WINPROC_AllocProc( descr->procA, descr->procW );
     release_class_ptr( classPtr );
-    return classPtr->winproc;
 }
 
 
@@ -416,7 +415,7 @@ void CLASS_RegisterBuiltinClasses(void)
     register_builtin( &COMBO_builtin_class );
     register_builtin( &COMBOLBOX_builtin_class );
     register_builtin( &DIALOG_builtin_class );
-    EDIT_winproc_handle = register_builtin( &EDIT_builtin_class );
+    register_builtin( &EDIT_builtin_class );
     register_builtin( &ICONTITLE_builtin_class );
     register_builtin( &LISTBOX_builtin_class );
     register_builtin( &MDICLIENT_builtin_class );
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index 37b9bc5..8325d8d 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -109,8 +109,6 @@ extern void register_wow_handlers(void) DECLSPEC_HIDDEN;
 extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new,
                                             struct wow_handlers32 *orig );
 
-extern WNDPROC EDIT_winproc_handle DECLSPEC_HIDDEN;
-
 /* Class functions */
 struct tagCLASS;  /* opaque structure */
 struct tagWND;
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index bb19a4e..dbb8ef2 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -2081,7 +2081,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod
          * more tolerant to A/W mismatches. The lack of W->A->W conversion for such a mismatch suggests
          * that the hack is in GetWindowLongPtr[AW], not in winprocs.
          */
-        if (wndPtr->winproc == EDIT_winproc_handle && (!unicode != !(wndPtr->flags & WIN_ISUNICODE)))
+        if (wndPtr->winproc == BUILTIN_WINPROC(WINPROC_EDIT) && (!unicode != !(wndPtr->flags & WIN_ISUNICODE)))
             retvalue = (ULONG_PTR)wndPtr->winproc;
         else
             retvalue = (ULONG_PTR)WINPROC_GetProc( wndPtr->winproc, unicode );
diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c
index a21b4f0..d0b4e90 100644
--- a/dlls/user32/winproc.c
+++ b/dlls/user32/winproc.c
@@ -49,8 +49,6 @@ typedef struct tagWINDOWPROC
 #define MAX_WINPROC_RECURSION  64
 #define WINPROC_PROC16  ((WINDOWPROC *)1)  /* placeholder for 16-bit window procs */
 
-WNDPROC EDIT_winproc_handle = 0;
-
 static LRESULT WINAPI ButtonWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
 static LRESULT WINAPI ButtonWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
 static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );




More information about the wine-cvs mailing list