summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-06-20 19:19:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-06-20 19:19:53 (GMT)
commit57d68d7c1623442deab713279fdfeb6daf13eff9 (patch)
tree74ab6e1f3ffb3c6e6de702e48dc0a992e5bcd516 /generic
parent9ff8e40fff5458c0dd6e606d79a127309cd985a9 (diff)
parent52d15b52d02ef41a6a25128de9bd49c2fc59b343 (diff)
downloadtcl-57d68d7c1623442deab713279fdfeb6daf13eff9.zip
tcl-57d68d7c1623442deab713279fdfeb6daf13eff9.tar.gz
tcl-57d68d7c1623442deab713279fdfeb6daf13eff9.tar.bz2
Remove dead code that complicates fs path values but adds no value.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclFileSystem.h5
-rw-r--r--generic/tclIOUtil.c7
-rw-r--r--generic/tclPathObj.c33
3 files changed, 10 insertions, 35 deletions
diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h
index 2d6f046..d09d240 100644
--- a/generic/tclFileSystem.h
+++ b/generic/tclFileSystem.h
@@ -63,10 +63,9 @@ typedef struct ThreadSpecificData {
MODULE_SCOPE int TclFSCwdPointerEquals(Tcl_Obj **pathPtrPtr);
MODULE_SCOPE int TclFSMakePathFromNormalized(Tcl_Interp *interp,
- Tcl_Obj *pathPtr, ClientData clientData);
+ Tcl_Obj *pathPtr);
MODULE_SCOPE int TclFSNormalizeToUniquePath(Tcl_Interp *interp,
- Tcl_Obj *pathPtr, int startAt,
- ClientData *clientDataPtr);
+ Tcl_Obj *pathPtr, int startAt);
MODULE_SCOPE Tcl_Obj * TclFSMakePathRelative(Tcl_Interp *interp,
Tcl_Obj *pathPtr, Tcl_Obj *cwdPtr);
MODULE_SCOPE Tcl_Obj * TclFSInternalToNormalized(
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 09877a3..e4b4ad6 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -1409,14 +1409,9 @@ int
TclFSNormalizeToUniquePath(
Tcl_Interp *interp, /* Used for error messages. */
Tcl_Obj *pathPtr, /* The path to normalize in place */
- int startAt, /* Start at this char-offset */
- ClientData *clientDataPtr) /* If we generated a complete normalized path
- * for a given filesystem, we can optionally
- * return an fs-specific clientdata here. */
+ int startAt) /* Start at this char-offset */
{
FilesystemRecord *fsRecPtr, *firstFsRecPtr;
- /* Ignore this variable */
- (void) clientDataPtr;
/*
* Call each of the "normalise path" functions in succession. This is a
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index cde554c..8e45ef1 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -159,7 +159,6 @@ TclFSNormalizeAbsolutePath(
* be calculated efficiently as a side-effect
* of normalization. */
{
- ClientData clientData = NULL;
const char *dirSep, *oldDirSep;
int first = 1; /* Set to zero once we've passed the first
* directory separator - we can't use '..' to
@@ -432,16 +431,16 @@ TclFSNormalizeAbsolutePath(
* for normalizing a path.
*/
- TclFSNormalizeToUniquePath(interp, retVal, 0, &clientData);
+ TclFSNormalizeToUniquePath(interp, retVal, 0);
/*
* Since we know it is a normalized path, we can actually convert this
* object into an FsPath for greater efficiency
*/
- TclFSMakePathFromNormalized(interp, retVal, clientData);
+ TclFSMakePathFromNormalized(interp, retVal);
if (clientDataPtr != NULL) {
- *clientDataPtr = clientData;
+ *clientDataPtr = NULL;
}
/*
@@ -1558,9 +1557,7 @@ TclFSMakePathRelative(
int
TclFSMakePathFromNormalized(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- Tcl_Obj *pathPtr, /* The object to convert. */
- ClientData nativeRep) /* The native rep for the object, if known
- * else NULL. */
+ Tcl_Obj *pathPtr) /* The object to convert. */
{
FsPath *fsPathPtr;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
@@ -1602,7 +1599,7 @@ TclFSMakePathFromNormalized(
fsPathPtr->normPathPtr = pathPtr;
fsPathPtr->cwdPtr = NULL;
- fsPathPtr->nativePathPtr = nativeRep;
+ fsPathPtr->nativePathPtr = NULL;
fsPathPtr->fsRecPtr = NULL;
fsPathPtr->filesystemEpoch = tsdPtr->filesystemEpoch;
@@ -1844,7 +1841,6 @@ Tcl_FSGetNormalizedPath(
Tcl_Obj *dir, *copy;
int cwdLen, pathType;
- ClientData clientData = NULL;
pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr);
dir = Tcl_FSGetNormalizedPath(interp, fsPathPtr->cwdPtr);
@@ -1892,8 +1888,7 @@ Tcl_FSGetNormalizedPath(
* after that separator.
*/
- TclFSNormalizeToUniquePath(interp, copy, cwdLen-1,
- (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL));
+ TclFSNormalizeToUniquePath(interp, copy, cwdLen-1);
}
/* Now we need to construct the new path object. */
@@ -1936,15 +1931,6 @@ Tcl_FSGetNormalizedPath(
TclDecrRefCount(dir);
}
- if (clientData != NULL) {
- /*
- * This may be unnecessary. It appears that the
- * TclFSNormalizeToUniquePath call above should have already
- * set this up. Not changing out of fear of the unknown.
- */
-
- fsPathPtr->nativePathPtr = clientData;
- }
PATHFLAGS(pathPtr) = 0;
}
@@ -1965,7 +1951,6 @@ Tcl_FSGetNormalizedPath(
} else if (fsPathPtr->normPathPtr == NULL) {
int cwdLen;
Tcl_Obj *copy;
- ClientData clientData = NULL;
copy = AppendPath(fsPathPtr->cwdPtr, pathPtr);
@@ -1977,13 +1962,9 @@ Tcl_FSGetNormalizedPath(
* of the previously normalized 'dir'. This should be much faster!
*/
- TclFSNormalizeToUniquePath(interp, copy, cwdLen-1,
- (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL));
+ TclFSNormalizeToUniquePath(interp, copy, cwdLen-1);
fsPathPtr->normPathPtr = copy;
Tcl_IncrRefCount(fsPathPtr->normPathPtr);
- if (clientData != NULL) {
- fsPathPtr->nativePathPtr = clientData;
- }
}
}
if (fsPathPtr->normPathPtr == NULL) {