Tcl Source Code

Artifact [c2df2103c2]
Login

Artifact c2df2103c20ba815d0038c221816d3102d13d952:

Attachment "2965056-1.patch" to ticket [2965056fff] added by nijtmans 2010-03-20 18:54:06.
### Eclipse Workspace Patch 1.0
#P tcl8.6
Index: win/tclWinSock.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinSock.c,v
retrieving revision 1.70
diff -u -r1.70 tclWinSock.c
--- win/tclWinSock.c	7 Mar 2010 14:39:25 -0000	1.70
+++ win/tclWinSock.c	20 Mar 2010 11:20:52 -0000
@@ -41,6 +41,7 @@
  */
 
 static int initialized = 0;
+static const TCHAR classname[] = TEXT("TclSocket");
 TCL_DECLARE_MUTEX(socketMutex)
 
 /*
@@ -247,12 +248,12 @@
 	windowClass.hInstance = TclWinGetTclInstance();
 	windowClass.hbrBackground = NULL;
 	windowClass.lpszMenuName = NULL;
-	windowClass.lpszClassName = "TclSocket";
+	windowClass.lpszClassName = classname;
 	windowClass.lpfnWndProc = SocketProc;
 	windowClass.hIcon = NULL;
 	windowClass.hCursor = NULL;
 
-	if (!RegisterClassA(&windowClass)) {
+	if (!RegisterClass(&windowClass)) {
 	    TclWinConvertError(GetLastError());
 	    goto initFailure;
 	}
@@ -394,7 +395,7 @@
      */
 
     TclpFinalizeSockets();
-    UnregisterClass("TclSocket", TclWinGetTclInstance());
+    UnregisterClass(classname, TclWinGetTclInstance());
     WSACleanup();
     initialized = 0;
     Tcl_MutexUnlock(&socketMutex);
@@ -2192,7 +2193,7 @@
      * Create a dummy window receiving socket events.
      */
 
-    tsdPtr->hwnd = CreateWindow("TclSocket", "TclSocket",
+    tsdPtr->hwnd = CreateWindow(classname, classname,
 	    WS_TILED, 0, 0, 0, 0, NULL, NULL, windowClass.hInstance, arg);
 
     /*
Index: win/tclWinNotify.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinNotify.c,v
retrieving revision 1.26
diff -u -r1.26 tclWinNotify.c
--- win/tclWinNotify.c	18 Nov 2009 21:59:49 -0000	1.26
+++ win/tclWinNotify.c	20 Mar 2010 11:20:50 -0000
@@ -52,6 +52,7 @@
  */
 
 static int notifierCount = 0;
+static const TCHAR classname[] = TEXT("TclNotifier");
 TCL_DECLARE_MUTEX(notifierMutex)
 
 /*
@@ -99,12 +100,12 @@
 	    class.hInstance = TclWinGetTclInstance();
 	    class.hbrBackground = NULL;
 	    class.lpszMenuName = NULL;
-	    class.lpszClassName = "TclNotifier";
+	    class.lpszClassName = classname;
 	    class.lpfnWndProc = NotifierProc;
 	    class.hIcon = NULL;
 	    class.hCursor = NULL;
 
-	    if (!RegisterClassA(&class)) {
+	    if (!RegisterClass(&class)) {
 		Tcl_Panic("Unable to register TclNotifier window class");
 	    }
 	}
@@ -187,7 +188,7 @@
 	Tcl_MutexLock(&notifierMutex);
 	notifierCount--;
 	if (notifierCount == 0) {
-	    UnregisterClassA("TclNotifier", TclWinGetTclInstance());
+	    UnregisterClass(classname, TclWinGetTclInstance());
 	}
 	Tcl_MutexUnlock(&notifierMutex);
     }
@@ -351,7 +352,7 @@
 	 */
 
 	if (mode == TCL_SERVICE_ALL && !tsdPtr->hwnd) {
-	    tsdPtr->hwnd = CreateWindowA("TclNotifier", "TclNotifier",
+	    tsdPtr->hwnd = CreateWindow(classname, classname,
 		    WS_TILED, 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(),
 		    NULL);