diff options
author | nijtmans <nijtmans> | 2010-05-05 22:43:46 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-05-05 22:43:46 (GMT) |
commit | 287b160a61d09c34c6e579e96552e2bb361058cc (patch) | |
tree | 8ae95fd9a12286e400bbcc22dcb85b0340401845 | |
parent | 12f45b93f54d74dcc7e81bd9b04f9734f832f72f (diff) | |
download | tcl-287b160a61d09c34c6e579e96552e2bb361058cc.zip tcl-287b160a61d09c34c6e579e96552e2bb361058cc.tar.gz tcl-287b160a61d09c34c6e579e96552e2bb361058cc.tar.bz2 |
Unnecessary type casts, See Tcl [Patch #2997087]
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclPkg.c | 24 |
2 files changed, 16 insertions, 12 deletions
@@ -1,3 +1,7 @@ +2010-05-06 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclPkg.c Unnecessary type casts, See Tcl [Patch #2997087] + 2010-05-04 Jan Nijtmans <nijtmans@users.sf.net> * win/tclWinNotify.c TCHAR-related fixes, making those two diff --git a/generic/tclPkg.c b/generic/tclPkg.c index d26c630..31972af 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.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: tclPkg.c,v 1.41 2009/12/11 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.42 2010/05/05 22:43:46 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -477,14 +477,14 @@ PkgRequireCore( * 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 @@ PkgRequireCore( "\n (\"package ifneeded %s %s\" script)", name, versionToProvide)); } - Tcl_Release((ClientData) versionToProvide); + Tcl_Release(versionToProvide); if (code != TCL_OK) { /* @@ -790,8 +790,8 @@ Tcl_PackageObjCmd( 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_PackageObjCmd( 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 @@ TclFreePackageInfo( 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); |