From de40abc6da2cdfe574bf281fbaf84fa03a7f619d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 11 May 2010 14:47:12 +0000 Subject: Unnecessary type casts, See Tcl [Patch #2997087] Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h --- ChangeLog | 11 +++++++++++ win/tclWinConsole.c | 4 ++-- win/tclWinDde.c | 12 ++++++------ win/tclWinLoad.c | 4 ++-- win/tclWinNotify.c | 6 +++--- win/tclWinPort.h | 7 +------ win/tclWinSerial.c | 4 ++-- win/tclWinSock.c | 14 +++++++------- win/tclWinTime.c | 4 ++-- 9 files changed, 36 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index e83dd5b..dabf2aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-05-06 Jan Nijtmans + + * win/tclWinConsole.c Unnecessary type casts, See Tcl [Patch #2997087] + * win/tclWinDde.c + * win/tclWinLoad.c + * win/tclWinNotify.c + * win/tclWinSerial.c + * win/tclWinSock.c + * win/tclWinTime.c + * win/tclWinPort.h Don't duplicate CYGWIN timezone #define from tclPort.h + 2010-05-07 Andreas Kupries * library/platform/platform.tcl: Fix cpu name for Solaris/Intel 64bit. diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index a47165c..eb24ef6 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.23 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.24 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1367,7 +1367,7 @@ TclWinOpenConsoleChannel( wsprintfA(channelName, "file%lx", (int) infoPtr); infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName, - (ClientData) infoPtr, permissions); + infoPtr, permissions); if (permissions & TCL_READABLE) { /* diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 3421510..a0d8145 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.42 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.43 2010/05/11 14:47:12 nijtmans Exp $ */ #undef STATIC_BUILD @@ -404,7 +404,7 @@ DdeSetServerName( } Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, - (ClientData) riPtr, DeleteProc); + riPtr, DeleteProc); if (Tcl_IsSafe(interp)) { Tcl_HideCommand(interp, "dde", "dde"); } @@ -1522,9 +1522,9 @@ DdeObjCmd( * 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 @@ DdeObjCmd( } 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 diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 3eb0134..b5924e6 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.29 2010/04/22 11:40:32 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.30 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -153,7 +153,7 @@ TclpDlopen( handlePtr->clientData = (ClientData) hInstance; handlePtr->findSymbolProcPtr = &FindSymbol; handlePtr->unloadFileProcPtr = &UnloadFile; - *loadHandle = (Tcl_LoadHandle) handlePtr; + *loadHandle = handlePtr; *unloadProcPtr = &UnloadFile; } return TCL_OK; diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 352379d..0245df3 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.27 2010/05/04 11:05:34 nijtmans Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.28 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclInt.h" @@ -122,7 +122,7 @@ Tcl_InitNotifier(void) tsdPtr->event = CreateEvent(NULL, TRUE /* manual */, FALSE /* !signaled */, NULL); - return (ClientData) tsdPtr; + return tsdPtr; } } @@ -363,7 +363,7 @@ Tcl_ServiceModeHook( * if one is needed. */ - Tcl_AlertNotifier((ClientData)tsdPtr); + Tcl_AlertNotifier(tsdPtr); } } } diff --git a/win/tclWinPort.h b/win/tclWinPort.h index fa049bf..d9b6801 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.57 2010/04/28 11:50:54 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.58 2010/05/11 14:47:12 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -410,11 +410,6 @@ # define environ _environ #endif /* __BORLANDC__ */ -#ifdef __CYGWIN__ -# define timezone _timezone -#endif /* __CYGWIN__ */ - - #ifdef __WATCOMC__ /* * OpenWatcom uses a wine derived winsock2.h that is missing the diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index f05207f..34bbf9c 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.42 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.43 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1506,7 +1506,7 @@ TclWinOpenSerialChannel( wsprintfA(channelName, "file%lx", (int) infoPtr); infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName, - (ClientData) infoPtr, permissions); + infoPtr, permissions); SetupComm(handle, infoPtr->sysBufRead, infoPtr->sysBufWrite); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 63f5f0c..5734cb5 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.71 2010/05/04 11:05:34 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.72 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -233,7 +233,7 @@ InitSockets(void) 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 @@ Tcl_OpenTcpClient( 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 @@ Tcl_MakeTcpClientChannel( 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 @@ Tcl_OpenTcpServer( 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 @@ TcpAccept( 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 @@ TcpGetHandleProc( { SocketInfo *statePtr = (SocketInfo *) instanceData; - *handlePtr = (ClientData) statePtr->socket; + *handlePtr = INT2PTR(statePtr->socket); return TCL_OK; } diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 9b30247..cf340c7 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.36 2010/01/10 22:58:39 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.37 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclInt.h" @@ -416,7 +416,7 @@ NativeGetTime( WaitForSingleObject(timeInfo.readyEvent, INFINITE); CloseHandle(timeInfo.readyEvent); - Tcl_CreateExitHandler(StopCalibration, (ClientData) NULL); + Tcl_CreateExitHandler(StopCalibration, NULL); } timeInfo.initialized = TRUE; } -- cgit v0.12