Index: win/tclWinNotify.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinNotify.c,v
retrieving revision 1.27
diff -u -r1.27 tclWinNotify.c
--- win/tclWinNotify.c	4 May 2010 11:05:34 -0000	1.27
+++ win/tclWinNotify.c	5 May 2010 11:38:25 -0000
@@ -122,7 +122,7 @@
 	tsdPtr->event = CreateEvent(NULL, TRUE /* manual */,
 		FALSE /* !signaled */, NULL);
 
-	return (ClientData) tsdPtr;
+	return tsdPtr;
     }
 }
 
@@ -363,7 +363,7 @@
 	     * if one is needed.
 	     */
 
-	    Tcl_AlertNotifier((ClientData)tsdPtr);
+	    Tcl_AlertNotifier(tsdPtr);
 	}
     }
 }
Index: win/tclWinPipe.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinPipe.c,v
retrieving revision 1.79
diff -u -r1.79 tclWinPipe.c
--- win/tclWinPipe.c	22 Apr 2010 11:40:32 -0000	1.79
+++ win/tclWinPipe.c	5 May 2010 11:38:27 -0000
@@ -1777,10 +1777,10 @@
 	return TCL_ERROR;
     }
 
-    *rchan = Tcl_MakeFileChannel((ClientData) readHandle, TCL_READABLE);
+    *rchan = Tcl_MakeFileChannel(readHandle, TCL_READABLE);
     Tcl_RegisterChannel(interp, *rchan);
 
-    *wchan = Tcl_MakeFileChannel((ClientData) writeHandle, TCL_WRITABLE);
+    *wchan = Tcl_MakeFileChannel(writeHandle, TCL_WRITABLE);
     Tcl_RegisterChannel(interp, *wchan);
 
     return TCL_OK;
@@ -2091,7 +2091,7 @@
 	if (pipePtr->errorFile) {
 	    WinFile *filePtr = (WinFile *) pipePtr->errorFile;
 
-	    errChan = Tcl_MakeFileChannel((ClientData) filePtr->handle,
+	    errChan = Tcl_MakeFileChannel(filePtr->handle,
 		    TCL_READABLE);
 	    ckfree((char *) filePtr);
 	} else {
@@ -2483,12 +2483,12 @@
 
     if (direction == TCL_READABLE && infoPtr->readFile) {
 	filePtr = (WinFile*) infoPtr->readFile;
-	*handlePtr = (ClientData) filePtr->handle;
+	*handlePtr = filePtr->handle;
 	return TCL_OK;
     }
     if (direction == TCL_WRITABLE && infoPtr->writeFile) {
 	filePtr = (WinFile*) infoPtr->writeFile;
-	*handlePtr = (ClientData) filePtr->handle;
+	*handlePtr = filePtr->handle;
 	return TCL_OK;
     }
     return TCL_ERROR;
@@ -3241,7 +3241,7 @@
 	TclDecrRefCount(tmpObj);
     }
 
-    return Tcl_MakeFileChannel((ClientData) handle,
+    return Tcl_MakeFileChannel(handle,
 	    TCL_READABLE|TCL_WRITABLE);
 
   gotError:
Index: win/tclWinDde.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinDde.c,v
retrieving revision 1.42
diff -u -r1.42 tclWinDde.c
--- win/tclWinDde.c	7 Mar 2010 14:39:25 -0000	1.42
+++ win/tclWinDde.c	5 May 2010 11:38:25 -0000
@@ -404,7 +404,7 @@
     }
 
     Tcl_CreateObjCommand(interp, "dde", DdeObjCmd,
-	    (ClientData) riPtr, DeleteProc);
+	    riPtr, DeleteProc);
     if (Tcl_IsSafe(interp)) {
 	Tcl_HideCommand(interp, "dde", "dde");
     }
@@ -1522,9 +1522,9 @@
 	     * server.
 	     */
 
-	    Tcl_Preserve((ClientData) riPtr);
+	    Tcl_Preserve(riPtr);
 	    sendInterp = riPtr->interp;
-	    Tcl_Preserve((ClientData) sendInterp);
+	    Tcl_Preserve(sendInterp);
 
 	    /*
 	     * Don't exchange objects between interps. The target interp would
@@ -1589,8 +1589,8 @@
 		}
 		Tcl_SetObjResult(interp, Tcl_GetObjResult(sendInterp));
 	    }
-	    Tcl_Release((ClientData) riPtr);
-	    Tcl_Release((ClientData) sendInterp);
+	    Tcl_Release(riPtr);
+	    Tcl_Release(sendInterp);
 	} else {
 	    /*
 	     * This is a non-local request. Send the script to the server and
Index: win/tclWinSock.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinSock.c,v
retrieving revision 1.71
diff -u -r1.71 tclWinSock.c
--- win/tclWinSock.c	4 May 2010 11:05:34 -0000	1.71
+++ win/tclWinSock.c	5 May 2010 11:38:29 -0000
@@ -233,7 +233,7 @@
 
     if (!initialized) {
 	initialized = 1;
-	TclCreateLateExitHandler(SocketExitHandler, (ClientData) NULL);
+	TclCreateLateExitHandler(SocketExitHandler, NULL);
 
 	/*
 	 * Create the async notification window with a new class. We must
@@ -1296,7 +1296,7 @@
     wsprintfA(channelName, "sock%d", infoPtr->socket);
 
     infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) infoPtr, (TCL_READABLE | TCL_WRITABLE));
+	    infoPtr, (TCL_READABLE | TCL_WRITABLE));
     if (Tcl_SetChannelOption(interp, infoPtr->channel, "-translation",
 	    "auto crlf") == TCL_ERROR) {
 	Tcl_Close((Tcl_Interp *) NULL, infoPtr->channel);
@@ -1360,7 +1360,7 @@
 
     wsprintfA(channelName, "sock%d", infoPtr->socket);
     infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) infoPtr, (TCL_READABLE | TCL_WRITABLE));
+	    infoPtr, (TCL_READABLE | TCL_WRITABLE));
     Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto crlf");
     return infoPtr->channel;
 }
@@ -1414,7 +1414,7 @@
     wsprintfA(channelName, "sock%d", infoPtr->socket);
 
     infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) infoPtr, 0);
+	    infoPtr, 0);
     if (Tcl_SetChannelOption(interp, infoPtr->channel, "-eofchar", "")
 	    == TCL_ERROR) {
 	Tcl_Close((Tcl_Interp *) NULL, infoPtr->channel);
@@ -1509,7 +1509,7 @@
 
     wsprintfA(channelName, "sock%d", newInfoPtr->socket);
     newInfoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) newInfoPtr, (TCL_READABLE | TCL_WRITABLE));
+	    newInfoPtr, (TCL_READABLE | TCL_WRITABLE));
     if (Tcl_SetChannelOption(NULL, newInfoPtr->channel, "-translation",
 	    "auto crlf") == TCL_ERROR) {
 	Tcl_Close((Tcl_Interp *) NULL, newInfoPtr->channel);
@@ -2162,7 +2162,7 @@
 {
     SocketInfo *statePtr = (SocketInfo *) instanceData;
 
-    *handlePtr = (ClientData) statePtr->socket;
+    *handlePtr = INT2PTR(statePtr->socket);
     return TCL_OK;
 }
 
Index: win/tclWinChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinChan.c,v
retrieving revision 1.57
diff -u -r1.57 tclWinChan.c
--- win/tclWinChan.c	22 Apr 2010 11:40:32 -0000	1.57
+++ win/tclWinChan.c	5 May 2010 11:38:23 -0000
@@ -814,7 +814,7 @@
     FileInfo *infoPtr = instanceData;
 
     if (direction & infoPtr->validMask) {
-	*handlePtr = (ClientData) infoPtr->handle;
+	*handlePtr = infoPtr->handle;
 	return TCL_OK;
     } else {
 	return TCL_ERROR;
Index: win/tclWinLoad.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinLoad.c,v
retrieving revision 1.29
diff -u -r1.29 tclWinLoad.c
--- win/tclWinLoad.c	22 Apr 2010 11:40:32 -0000	1.29
+++ win/tclWinLoad.c	5 May 2010 11:38:25 -0000
@@ -150,10 +150,10 @@
     } else {
 	handlePtr = 
 	    (Tcl_LoadHandle) ckalloc(sizeof(struct Tcl_LoadHandle_));
-	handlePtr->clientData = (ClientData) hInstance;
+	handlePtr->clientData = hInstance;
 	handlePtr->findSymbolProcPtr = &FindSymbol;
 	handlePtr->unloadFileProcPtr = &UnloadFile;
-	*loadHandle = (Tcl_LoadHandle) handlePtr;
+	*loadHandle = handlePtr;
 	*unloadProcPtr = &UnloadFile;
     }
     return TCL_OK;
Index: win/tclWinConsole.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinConsole.c,v
retrieving revision 1.23
diff -u -r1.23 tclWinConsole.c
--- win/tclWinConsole.c	13 Jan 2010 06:46:56 -0000	1.23
+++ win/tclWinConsole.c	5 May 2010 11:38:24 -0000
@@ -1014,7 +1014,7 @@
 {
     ConsoleInfo *infoPtr = (ConsoleInfo *) instanceData;
 
-    *handlePtr = (ClientData) infoPtr->handle;
+    *handlePtr = infoPtr->handle;
     return TCL_OK;
 }
 
@@ -1367,7 +1367,7 @@
     wsprintfA(channelName, "file%lx", (int) infoPtr);
 
     infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName,
-	    (ClientData) infoPtr, permissions);
+	    infoPtr, permissions);
 
     if (permissions & TCL_READABLE) {
 	/*
Index: win/tclWinSerial.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinSerial.c,v
retrieving revision 1.42
diff -u -r1.42 tclWinSerial.c
--- win/tclWinSerial.c	15 Feb 2010 22:56:19 -0000	1.42
+++ win/tclWinSerial.c	5 May 2010 11:38:28 -0000
@@ -1292,7 +1292,7 @@
 {
     SerialInfo *infoPtr = (SerialInfo *) instanceData;
 
-    *handlePtr = (ClientData) infoPtr->handle;
+    *handlePtr = infoPtr->handle;
     return TCL_OK;
 }
 
@@ -1506,7 +1506,7 @@
     wsprintfA(channelName, "file%lx", (int) infoPtr);
 
     infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName,
-	    (ClientData) infoPtr, permissions);
+	    infoPtr, permissions);
 
 
     SetupComm(handle, infoPtr->sysBufRead, infoPtr->sysBufWrite);
Index: win/tclWinTime.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinTime.c,v
retrieving revision 1.36
diff -u -r1.36 tclWinTime.c
--- win/tclWinTime.c	10 Jan 2010 22:58:39 -0000	1.36
+++ win/tclWinTime.c	5 May 2010 11:38:29 -0000
@@ -416,7 +416,7 @@
 
 		WaitForSingleObject(timeInfo.readyEvent, INFINITE);
 		CloseHandle(timeInfo.readyEvent);
-		Tcl_CreateExitHandler(StopCalibration, (ClientData) NULL);
+		Tcl_CreateExitHandler(StopCalibration, NULL);
 	    }
 	    timeInfo.initialized = TRUE;
 	}
Index: generic/tclPkg.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclPkg.c,v
retrieving revision 1.41
diff -u -r1.41 tclPkg.c
--- generic/tclPkg.c	11 Dec 2009 23:10:47 -0000	1.41
+++ generic/tclPkg.c	5 May 2010 11:38:13 -0000
@@ -477,14 +477,14 @@
 	     * will still exist when the script completes.
 	     */
 
-	    const char *versionToProvide = bestPtr->version;
+	    char *versionToProvide = bestPtr->version;
 	    script = bestPtr->script;
 
-	    pkgPtr->clientData = (ClientData) versionToProvide;
-	    Tcl_Preserve((ClientData) script);
-	    Tcl_Preserve((ClientData) versionToProvide);
+	    pkgPtr->clientData = versionToProvide;
+	    Tcl_Preserve(script);
+	    Tcl_Preserve(versionToProvide);
 	    code = Tcl_EvalEx(interp, script, -1, TCL_EVAL_GLOBAL);
-	    Tcl_Release((ClientData) script);
+	    Tcl_Release(script);
 
 	    pkgPtr = FindPackage(interp, name);
 	    if (code == TCL_OK) {
@@ -536,7 +536,7 @@
 			"\n    (\"package ifneeded %s %s\" script)",
 			name, versionToProvide));
 	    }
-	    Tcl_Release((ClientData) versionToProvide);
+	    Tcl_Release(versionToProvide);
 
 	    if (code != TCL_OK) {
 		/*
@@ -790,8 +790,8 @@
 	    while (pkgPtr->availPtr != NULL) {
 		availPtr = pkgPtr->availPtr;
 		pkgPtr->availPtr = availPtr->nextPtr;
-		Tcl_EventuallyFree((ClientData)availPtr->version, TCL_DYNAMIC);
-		Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC);
+		Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC);
+		Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC);
 		ckfree((char *) availPtr);
 	    }
 	    ckfree((char *) pkgPtr);
@@ -840,7 +840,7 @@
 		    Tcl_SetResult(interp, availPtr->script, TCL_VOLATILE);
 		    return TCL_OK;
 		}
-		Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC);
+		Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC);
 		break;
 	    }
 	}
@@ -1201,8 +1201,8 @@
 	while (pkgPtr->availPtr != NULL) {
 	    availPtr = pkgPtr->availPtr;
 	    pkgPtr->availPtr = availPtr->nextPtr;
-	    Tcl_EventuallyFree((ClientData)availPtr->version, TCL_DYNAMIC);
-	    Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC);
+	    Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC);
+	    Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC);
 	    ckfree((char *) availPtr);
 	}
 	ckfree((char *) pkgPtr);
Index: generic/tclTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTest.c,v
retrieving revision 1.151
diff -u -r1.151 tclTest.c
--- generic/tclTest.c	20 Apr 2010 14:24:34 -0000	1.151
+++ generic/tclTest.c	5 May 2010 11:38:17 -0000
@@ -634,9 +634,9 @@
     Tcl_CreateCommand(interp, "testsetnoerr", TestsetCmd,
 	    NULL, NULL);
     Tcl_CreateCommand(interp, "testseterr", TestsetCmd,
-	    (ClientData) TCL_LEAVE_ERR_MSG, NULL);
+	    INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
     Tcl_CreateCommand(interp, "testset2", Testset2Cmd,
-	    (ClientData) TCL_LEAVE_ERR_MSG, NULL);
+	    INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
     Tcl_CreateCommand(interp, "testseterrorcode", TestseterrorcodeCmd,
 	    NULL, NULL);
     Tcl_CreateObjCommand(interp, "testsetobjerrorcode",
@@ -650,8 +650,8 @@
     Tcl_CreateCommand(interp, "testtranslatefilename",
 	    TesttranslatefilenameCmd, NULL, NULL);
     Tcl_CreateCommand(interp, "testupvar", TestupvarCmd, NULL, NULL);
-    Tcl_CreateMathFunc(interp, "T1", 0, NULL, TestMathFunc, (ClientData) 123);
-    Tcl_CreateMathFunc(interp, "T2", 0, NULL, TestMathFunc, (ClientData) 345);
+    Tcl_CreateMathFunc(interp, "T1", 0, NULL, TestMathFunc, INT2PTR(123));
+    Tcl_CreateMathFunc(interp, "T2", 0, NULL, TestMathFunc, INT2PTR(345));
     Tcl_CreateCommand(interp, "testmainthread", TestmainthreadCmd, NULL,
 	    NULL);
     Tcl_CreateCommand(interp, "testsetmainloop", TestsetmainloopCmd,
@@ -788,8 +788,7 @@
 	asyncPtr = (TestAsyncHandler *) ckalloc(sizeof(TestAsyncHandler));
 	asyncPtr->id = nextId;
 	nextId++;
-	asyncPtr->handler = Tcl_AsyncCreate(AsyncHandlerProc,
-		(ClientData) asyncPtr);
+	asyncPtr->handler = Tcl_AsyncCreate(AsyncHandlerProc, asyncPtr);
 	asyncPtr->command = (char *) ckalloc((unsigned) (strlen(argv[2]) + 1));
 	strcpy(asyncPtr->command, argv[2]);
 	asyncPtr->nextPtr = firstHandler;
@@ -857,7 +856,7 @@
 	    if (asyncPtr->id == id) {
 		Tcl_ThreadId threadID;
 		if (Tcl_CreateThread(&threadID, AsyncThreadProc,
-			(ClientData) asyncPtr, TCL_THREAD_STACK_DEFAULT,
+			asyncPtr, TCL_THREAD_STACK_DEFAULT,
 			TCL_THREAD_NOFLAGS) != TCL_OK) {
 		    Tcl_SetResult(interp, "can't create thread", TCL_STATIC);
 		    return TCL_ERROR;
@@ -1209,7 +1208,7 @@
 	deleteCalled = 0;
 	cmdTrace = Tcl_CreateObjTrace(interp, 50000,
 		TCL_ALLOW_INLINE_COMPILATION, ObjTraceProc,
-		(ClientData) &deleteCalled, ObjTraceDeleteProc);
+		&deleteCalled, ObjTraceDeleteProc);
 	result = Tcl_Eval(interp, argv[2]);
 	Tcl_DeleteTrace(interp, cmdTrace);
 	if (!deleteCalled) {
@@ -1454,10 +1453,10 @@
 	}
 	if (id < 0) {
 	    Tcl_DontCallWhenDeleted(delInterp, DelCallbackProc,
-		    (ClientData) INT2PTR(-id));
+		    INT2PTR(-id));
 	} else {
 	    Tcl_CallWhenDeleted(delInterp, DelCallbackProc,
-		    (ClientData) INT2PTR(id));
+		    INT2PTR(id));
 	}
     }
     Tcl_DeleteInterp(delInterp);
@@ -1527,7 +1526,7 @@
     dPtr->deleteCmd = (char *) ckalloc((unsigned) (strlen(argv[3]) + 1));
     strcpy(dPtr->deleteCmd, argv[3]);
 
-    Tcl_CreateCommand(slave, argv[2], DelCmdProc, (ClientData) dPtr,
+    Tcl_CreateCommand(slave, argv[2], DelCmdProc, dPtr,
 	    DelDeleteProc);
     return TCL_OK;
 }
@@ -1785,7 +1784,7 @@
 	type.toUtfProc = EncodingToUtfProc;
 	type.fromUtfProc = EncodingFromUtfProc;
 	type.freeProc = EncodingFreeProc;
-	type.clientData = (ClientData) encodingPtr;
+	type.clientData = encodingPtr;
 	type.nullSize = 1;
 
 	Tcl_CreateEncoding(&type);
@@ -2188,10 +2187,10 @@
     }
     if (strcmp(argv[1], "create") == 0) {
 	Tcl_CreateExitHandler((value & 1) ? ExitProcOdd : ExitProcEven,
-		(ClientData) INT2PTR(value));
+		INT2PTR(value));
     } else if (strcmp(argv[1], "delete") == 0) {
 	Tcl_DeleteExitHandler((value & 1) ? ExitProcOdd : ExitProcEven,
-		(ClientData) INT2PTR(value));
+		INT2PTR(value));
     } else {
 	Tcl_AppendResult(interp, "bad option \"", argv[1],
 		"\": must be create or delete", NULL);
@@ -4020,8 +4019,7 @@
 	ckfree(oldData);
     }
 
-    Tcl_SetAssocData(interp, argv[1], CleanupTestSetassocdataTests,
-	(ClientData) buf);
+    Tcl_SetAssocData(interp, argv[1], CleanupTestSetassocdataTests, buf);
     return TCL_OK;
 }
 
@@ -5691,7 +5689,7 @@
 	Tcl_IncrRefCount(esPtr->scriptPtr);
 
 	Tcl_CreateChannelHandler((Tcl_Channel) chanPtr, mask,
-		TclChannelEventScriptInvoker, (ClientData) esPtr);
+		TclChannelEventScriptInvoker, esPtr);
 
 	return TCL_OK;
     }
@@ -5735,7 +5733,7 @@
 	    prevEsPtr->nextPtr = esPtr->nextPtr;
 	}
 	Tcl_DeleteChannelHandler((Tcl_Channel) chanPtr,
-		TclChannelEventScriptInvoker, (ClientData) esPtr);
+		TclChannelEventScriptInvoker, esPtr);
 	Tcl_DecrRefCount(esPtr->scriptPtr);
 	ckfree((char *) esPtr);
 
@@ -5776,7 +5774,7 @@
 	     esPtr = nextEsPtr) {
 	    nextEsPtr = esPtr->nextPtr;
 	    Tcl_DeleteChannelHandler((Tcl_Channel) chanPtr,
-		    TclChannelEventScriptInvoker, (ClientData) esPtr);
+		    TclChannelEventScriptInvoker, esPtr);
 	    Tcl_DecrRefCount(esPtr->scriptPtr);
 	    ckfree((char *) esPtr);
 	}
@@ -5822,7 +5820,7 @@
 	}
 	esPtr->mask = mask;
 	Tcl_CreateChannelHandler((Tcl_Channel) chanPtr, mask,
-		TclChannelEventScriptInvoker, (ClientData) esPtr);
+		TclChannelEventScriptInvoker, esPtr);
 	return TCL_OK;
     }
     Tcl_AppendResult(interp, "bad command ", cmd, ", must be one of "
@@ -5974,7 +5972,7 @@
 	return TCL_ERROR;
     }
     if (boolVal) {
-	res = Tcl_FSRegister((ClientData)interp, &testReportingFilesystem);
+	res = Tcl_FSRegister(interp, &testReportingFilesystem);
 	msg = (res == TCL_OK) ? "registered" : "failed";
     } else {
 	res = Tcl_FSUnregister(&testReportingFilesystem);
@@ -6009,7 +6007,7 @@
 	return -1;
     }
     lastPathPtr = NULL;
-    *clientDataPtr = (ClientData) newPathPtr;
+    *clientDataPtr = newPathPtr;
     return TCL_OK;
 }
 
@@ -6346,7 +6344,7 @@
 	return TCL_ERROR;
     }
     if (boolVal) {
-	res = Tcl_FSRegister((ClientData)interp, &simpleFilesystem);
+	res = Tcl_FSRegister(interp, &simpleFilesystem);
 	msg = (res == TCL_OK) ? "registered" : "failed";
     } else {
 	res = Tcl_FSUnregister(&simpleFilesystem);
Index: generic/tclIOUtil.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIOUtil.c,v
retrieving revision 1.176
diff -u -r1.176 tclIOUtil.c
--- generic/tclIOUtil.c	27 Apr 2010 08:20:00 -0000	1.176
+++ generic/tclIOUtil.c	5 May 2010 11:38:12 -0000
@@ -3280,7 +3280,7 @@
     
     divertedLoadHandle = (Tcl_LoadHandle)
 	    ckalloc(sizeof (struct Tcl_LoadHandle_));
-    divertedLoadHandle->clientData = (ClientData) tvdlPtr;
+    divertedLoadHandle->clientData = tvdlPtr;
     divertedLoadHandle->findSymbolProcPtr = DivertFindSymbol;
     divertedLoadHandle->unloadFileProcPtr = DivertUnloadFile;
     *handlePtr = divertedLoadHandle;
Index: generic/tclUtil.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclUtil.c,v
retrieving revision 1.115
diff -u -r1.115 tclUtil.c
--- generic/tclUtil.c	27 Apr 2010 12:36:22 -0000	1.115
+++ generic/tclUtil.c	5 May 2010 11:38:19 -0000
@@ -2898,7 +2898,7 @@
 
     if (NULL == *tablePtrPtr) {
 	*tablePtrPtr = (Tcl_HashTable *)ckalloc(sizeof(Tcl_HashTable));
-	Tcl_CreateThreadExitHandler(FreeThreadHash, (ClientData)*tablePtrPtr);
+	Tcl_CreateThreadExitHandler(FreeThreadHash, *tablePtrPtr);
 	Tcl_InitHashTable(*tablePtrPtr, TCL_ONE_WORD_KEYS);
     }
     return *tablePtrPtr;
@@ -2989,7 +2989,7 @@
     if (NULL != pgvPtr->value) {
 	ckfree(pgvPtr->value);
     } else {
-	Tcl_CreateExitHandler(FreeProcessGlobalValue, (ClientData) pgvPtr);
+	Tcl_CreateExitHandler(FreeProcessGlobalValue, pgvPtr);
     }
     bytes = Tcl_GetStringFromObj(newValue, &pgvPtr->numBytes);
     pgvPtr->value = ckalloc((unsigned) pgvPtr->numBytes + 1);
Index: generic/tclThreadTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclThreadTest.c,v
retrieving revision 1.35
diff -u -r1.35 tclThreadTest.c
--- generic/tclThreadTest.c	23 Nov 2009 20:17:36 -0000	1.35
+++ generic/tclThreadTest.c	5 May 2010 11:38:18 -0000
@@ -511,7 +511,7 @@
     joinable = joinable ? TCL_THREAD_JOINABLE : TCL_THREAD_NOFLAGS;
 
     Tcl_MutexLock(&threadMutex);
-    if (Tcl_CreateThread(&id, NewTestThread, (ClientData) &ctrl,
+    if (Tcl_CreateThread(&id, NewTestThread, &ctrl,
 	    TCL_THREAD_STACK_DEFAULT, joinable) != TCL_OK) {
 	Tcl_MutexUnlock(&threadMutex);
 	Tcl_AppendResult(interp, "can't create a new thread", NULL);
Index: unix/tclUnixFile.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixFile.c,v
retrieving revision 1.57
diff -u -r1.57 tclUnixFile.c
--- unix/tclUnixFile.c	22 Apr 2010 11:40:32 -0000	1.57
+++ unix/tclUnixFile.c	5 May 2010 11:38:21 -0000
@@ -710,7 +710,7 @@
 	char *newCd = ckalloc((unsigned) strlen(buffer) + 1);
 
 	strcpy(newCd, buffer);
-	return (ClientData) newCd;
+	return newCd;
     }
 
     /*
Index: unix/tclUnixNotfy.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixNotfy.c,v
retrieving revision 1.41
diff -u -r1.41 tclUnixNotfy.c
--- unix/tclUnixNotfy.c	17 Dec 2009 00:06:21 -0000	1.41
+++ unix/tclUnixNotfy.c	5 May 2010 11:38:21 -0000
@@ -232,7 +232,7 @@
 
 	Tcl_MutexUnlock(&notifierMutex);
 #endif
-	return (ClientData) tsdPtr;
+	return tsdPtr;
     }
 }
 
Index: unix/tclLoadNext.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadNext.c,v
retrieving revision 1.17
diff -u -r1.17 tclLoadNext.c
--- unix/tclLoadNext.c	2 Apr 2010 21:21:06 -0000	1.17
+++ unix/tclLoadNext.c	5 May 2010 11:38:19 -0000
@@ -104,7 +104,7 @@
     NXCloseMemory(errorStream, NX_FREEBUFFER);
 
     newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle));
-    newHandle->clientData = (ClientData) 1;
+    newHandle->clientData = INT2PTR(1);
     newHandle->findSymbolProcPtr = &FindSymbol;
     newHandle->unloadFileProcPtr = &UnloadFile;
     *loadHandle = newHandle;
Index: unix/tclUnixChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixChan.c,v
retrieving revision 1.105
diff -u -r1.105 tclUnixChan.c
--- unix/tclUnixChan.c	13 Jan 2010 06:46:57 -0000	1.105
+++ unix/tclUnixChan.c	5 May 2010 11:38:21 -0000
@@ -1618,7 +1618,7 @@
     fsPtr->fd = fd;
 
     fsPtr->channel = Tcl_CreateChannel(channelTypePtr, channelName,
-	    (ClientData) fsPtr, channelPermissions);
+	    fsPtr, channelPermissions);
 
     if (translation != NULL) {
 	/*
@@ -1683,7 +1683,7 @@
 #endif /* SUPPORTS_TTY */
     if ((getsockname(fd, &sockaddr, &sockaddrLen) == 0)
 	    && (sockaddrLen > 0) && (sockaddr.sa_family == AF_INET)) {
-	return TclpMakeTcpClientChannelMode((ClientData) INT2PTR(fd), mode);
+	return TclpMakeTcpClientChannelMode(INT2PTR(fd), mode);
     } else {
 	channelTypePtr = &fileChannelType;
 	fsPtr = (FileState *) ckalloc((unsigned) sizeof(FileState));
@@ -1693,7 +1693,7 @@
     fsPtr->fd = fd;
     fsPtr->validMask = mode | TCL_EXCEPTION;
     fsPtr->channel = Tcl_CreateChannel(channelTypePtr, channelName,
-	    (ClientData) fsPtr, mode);
+	    fsPtr, mode);
 
     return fsPtr->channel;
 }
@@ -1767,7 +1767,7 @@
 #undef ZERO_OFFSET
 #undef ERROR_OFFSET
 
-    channel = Tcl_MakeFileChannel((ClientData) INT2PTR(fd), mode);
+    channel = Tcl_MakeFileChannel(INT2PTR(fd), mode);
     if (channel == NULL) {
 	return NULL;
     }
Index: unix/tclLoadDl.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadDl.c,v
retrieving revision 1.23
diff -u -r1.23 tclLoadDl.c
--- unix/tclLoadDl.c	26 Apr 2010 22:30:05 -0000	1.23
+++ unix/tclLoadDl.c	5 May 2010 11:38:19 -0000
@@ -113,7 +113,7 @@
 	return TCL_ERROR;
     }
     newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle));
-    newHandle->clientData = (ClientData) handle;
+    newHandle->clientData = handle;
     newHandle->findSymbolProcPtr = &FindSymbol;
     newHandle->unloadFileProcPtr = &UnloadFile;
     *unloadProcPtr = &UnloadFile;
Index: unix/tclUnixSock.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixSock.c,v
retrieving revision 1.25
diff -u -r1.25 tclUnixSock.c
--- unix/tclUnixSock.c	1 Mar 2010 15:00:45 -0000	1.25
+++ unix/tclUnixSock.c	5 May 2010 11:38:22 -0000
@@ -765,7 +765,7 @@
 	if (mask) {
 	    Tcl_CreateFileHandler(statePtr->fd, mask,
 		    (Tcl_FileProc *) Tcl_NotifyChannel,
-		    (ClientData) statePtr->channel);
+		    statePtr->channel);
 	} else {
 	    Tcl_DeleteFileHandler(statePtr->fd);
 	}
@@ -799,7 +799,7 @@
 {
     TcpState *statePtr = (TcpState *) instanceData;
 
-    *handlePtr = (ClientData) INT2PTR(statePtr->fd);
+    *handlePtr = INT2PTR(statePtr->fd);
     return TCL_OK;
 }
 
@@ -1143,7 +1143,7 @@
     sprintf(channelName, "sock%d", statePtr->fd);
 
     statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE));
+	    statePtr, (TCL_READABLE | TCL_WRITABLE));
     if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation",
 	    "auto crlf") == TCL_ERROR) {
 	Tcl_Close(NULL, statePtr->channel);
@@ -1210,7 +1210,7 @@
     sprintf(channelName, "sock%d", statePtr->fd);
 
     statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) statePtr, mode);
+	    statePtr, mode);
     if (Tcl_SetChannelOption(NULL, statePtr->channel, "-translation",
 	    "auto crlf") == TCL_ERROR) {
 	Tcl_Close(NULL, statePtr->channel);
@@ -1267,10 +1267,10 @@
      */
 
     Tcl_CreateFileHandler(statePtr->fd, TCL_READABLE, TcpAccept,
-	    (ClientData) statePtr);
+	    statePtr);
     sprintf(channelName, "sock%d", statePtr->fd);
     statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) statePtr, 0);
+	    statePtr, 0);
     return statePtr->channel;
 }
 
@@ -1327,7 +1327,7 @@
 
     sprintf(channelName, "sock%d", newsock);
     newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
-	    (ClientData) newSockState, (TCL_READABLE | TCL_WRITABLE));
+	    newSockState, (TCL_READABLE | TCL_WRITABLE));
 
     Tcl_SetChannelOption(NULL, newSockState->channel, "-translation",
 	    "auto crlf");
Index: unix/tclUnixTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixTest.c,v
retrieving revision 1.33
diff -u -r1.33 tclUnixTest.c
--- unix/tclUnixTest.c	25 Feb 2010 22:20:10 -0000	1.33
+++ unix/tclUnixTest.c	5 May 2010 11:38:22 -0000
@@ -238,24 +238,24 @@
 
 	if (strcmp(argv[3], "readable") == 0) {
 	    Tcl_CreateFileHandler(GetFd(pipePtr->readFile), TCL_READABLE,
-		    TestFileHandlerProc, (ClientData) pipePtr);
+		    TestFileHandlerProc, pipePtr);
 	} else if (strcmp(argv[3], "off") == 0) {
 	    Tcl_DeleteFileHandler(GetFd(pipePtr->readFile));
 	} else if (strcmp(argv[3], "disabled") == 0) {
 	    Tcl_CreateFileHandler(GetFd(pipePtr->readFile), 0,
-		    TestFileHandlerProc, (ClientData) pipePtr);
+		    TestFileHandlerProc, pipePtr);
 	} else {
 	    Tcl_AppendResult(interp, "bad read mode \"", argv[3], "\"", NULL);
 	    return TCL_ERROR;
 	}
 	if (strcmp(argv[4], "writable") == 0) {
 	    Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), TCL_WRITABLE,
-		    TestFileHandlerProc, (ClientData) pipePtr);
+		    TestFileHandlerProc, pipePtr);
 	} else if (strcmp(argv[4], "off") == 0) {
 	    Tcl_DeleteFileHandler(GetFd(pipePtr->writeFile));
 	} else if (strcmp(argv[4], "disabled") == 0) {
 	    Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), 0,
-		    TestFileHandlerProc, (ClientData) pipePtr);
+		    TestFileHandlerProc, pipePtr);
 	} else {
 	    Tcl_AppendResult(interp, "bad read mode \"", argv[4], "\"", NULL);
 	    return TCL_ERROR;
