summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authoruid37547 <uid37547>2002-01-31 21:07:32 (GMT)
committeruid37547 <uid37547>2002-01-31 21:07:32 (GMT)
commit59cc0d6c6ff11c5ca06cfa510f97794cda5f223c (patch)
tree8a37249e9fb90e99fadeb5bb29e182a758adb719 /win
parent53d84dcffcf3c1a3ce307a08e01f3052fd923552 (diff)
downloadtcl-59cc0d6c6ff11c5ca06cfa510f97794cda5f223c.zip
tcl-59cc0d6c6ff11c5ca06cfa510f97794cda5f223c.tar.gz
tcl-59cc0d6c6ff11c5ca06cfa510f97794cda5f223c.tar.bz2
* win/tclWinFCmd.c: TIP 27: Applied patch fixing CONST warnings on
behalf of Don Porter <dgp@users.sourceforge.net>.
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFCmd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 5ebe7d7..dc1ed7b 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.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: tclWinFCmd.c,v 1.20 2002/01/25 21:36:10 dgp Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.21 2002/01/31 21:07:32 uid37547 Exp $
*/
#include "tclWinInt.h"
@@ -1824,7 +1824,8 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint)
char *nativePath;
int nativeLen;
- nativePath = Tcl_UtfToExternalDString(NULL, path, -1, &ds);
+ Tcl_UtfToExternalDString(NULL, path, -1, &ds);
+ nativePath = Tcl_DStringValue(&ds);
nativeLen = Tcl_DStringLength(&ds);
/* We're on Windows 95/98 */
@@ -1868,7 +1869,8 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint)
*/
/* Copy over the valid part of the path and find its length */
- path = Tcl_ExternalToUtfDString(NULL, nativePath, -1, &eDs);
+ Tcl_ExternalToUtfDString(NULL, nativePath, -1, &eDs);
+ path = Tcl_DStringValue(&eDs);
if (path[1] == ':') {
if (path[0] >= 'a' && path[0] <= 'z') {
/* Make uppercase */
@@ -1879,10 +1881,11 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint)
Tcl_SetStringObj(pathPtr, path, Tcl_DStringLength(&eDs));
Tcl_DStringFree(&eDs);
if (lastValidPathEnd != (nativePath + nativeLen)) {
+ CONST char *tmp;
*lastValidPathEnd = '/';
/* Now copy over the invalid (i.e. non-existent) part of the path */
- path = Tcl_ExternalToUtfDString(NULL, lastValidPathEnd, -1, &eDs);
- Tcl_AppendToObj(pathPtr, path, Tcl_DStringLength(&eDs));
+ tmp = Tcl_ExternalToUtfDString(NULL, lastValidPathEnd, -1, &eDs);
+ Tcl_AppendToObj(pathPtr, tmp, Tcl_DStringLength(&eDs));
Tcl_DStringFree(&eDs);
}
Tcl_DStringFree(&ds);