diff options
author | dkf <dkf@noemail.net> | 2007-04-10 14:47:06 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2007-04-10 14:47:06 (GMT) |
commit | 807909c8786778cefc690ac7f1eb5e7fce6757c9 (patch) | |
tree | e12acd4bb445070087067812722f564f29218f8d /generic/tclPathObj.c | |
parent | a4830b01f6f650ea70a34c388fcee6966cdb3222 (diff) | |
download | tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.zip tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.tar.gz tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.tar.bz2 |
Handle creation of Tcl_Objs from constant strings better (easier to use, more
efficient). After [Patch 1529526] (afredd)
FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index a3dce53..e49141f 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.58 2007/02/20 23:24:02 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.59 2007/04/10 14:47:17 dkf Exp $ */ #include "tclInt.h" @@ -731,7 +731,7 @@ TclPathPart( resultPtr = Tcl_FSJoinPath(splitPtr, splitElements - 1); } else if (splitElements == 0 || (Tcl_FSGetPathType(pathPtr) == TCL_PATH_RELATIVE)) { - resultPtr = Tcl_NewStringObj(".", 1); + TclNewLiteralStringObj(resultPtr, "."); } else { Tcl_ListObjIndex(NULL, splitPtr, 0, &resultPtr); } |