summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 9ce22e5..b210a50 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.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: tclPathObj.c,v 1.34 2004/09/27 15:00:40 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.35 2004/09/29 22:17:30 dkf Exp $
*/
#include "tclInt.h"
@@ -1204,9 +1204,7 @@ TclFSMakePathRelative(interp, pathPtr, cwdPtr)
}
pathPtr->typePtr->updateStringProc(pathPtr);
}
- if ((pathPtr->typePtr->freeIntRepProc) != NULL) {
- (*pathPtr->typePtr->freeIntRepProc)(pathPtr);
- }
+ TclFreeIntRep(pathPtr);
}
fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath));
@@ -1308,9 +1306,7 @@ TclFSMakePathFromNormalized(interp, pathPtr, nativeRep)
}
pathPtr->typePtr->updateStringProc(pathPtr);
}
- if ((pathPtr->typePtr->freeIntRepProc) != NULL) {
- (*pathPtr->typePtr->freeIntRepProc)(pathPtr);
- }
+ TclFreeIntRep(pathPtr);
}
fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath));
@@ -1384,9 +1380,7 @@ Tcl_FSNewNativePath(fromFilesystem, clientData)
}
pathPtr->typePtr->updateStringProc(pathPtr);
}
- if ((pathPtr->typePtr->freeIntRepProc) != NULL) {
- (*pathPtr->typePtr->freeIntRepProc)(pathPtr);
- }
+ TclFreeIntRep(pathPtr);
}
fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath));
@@ -2252,9 +2246,7 @@ SetFsPathFromAny(interp, pathPtr)
/*
* Free old representation before installing our new one.
*/
- if (pathPtr->typePtr != NULL && pathPtr->typePtr->freeIntRepProc != NULL) {
- (pathPtr->typePtr->freeIntRepProc)(pathPtr);
- }
+ TclFreeIntRep(pathPtr);
PATHOBJ(pathPtr) = (VOID *) fsPathPtr;
PATHFLAGS(pathPtr) = 0;
pathPtr->typePtr = &tclFsPathType;