summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-04-25 12:07:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-04-25 12:07:45 (GMT)
commit46a826db38fe47acda1efb7714281b9df8ead242 (patch)
tree9287ec35f60eeed086288278741ae7b69817beda /win/tclWinInit.c
parent5e51fad7d7a9da7e201afd58883e13e04b2aae74 (diff)
downloadtcl-46a826db38fe47acda1efb7714281b9df8ead242.zip
tcl-46a826db38fe47acda1efb7714281b9df8ead242.tar.gz
tcl-46a826db38fe47acda1efb7714281b9df8ead242.tar.bz2
* generic/tclUtil.c (TclDStringToObj): Added internal function to make
the fairly-common operation of converting a DString into an Obj a more efficient one.
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index fb53685..3bfff63 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -299,9 +299,8 @@ AppendEnvironment(
pathv[pathc - 1] = shortlib;
Tcl_DStringInit(&ds);
- str = Tcl_JoinPath(pathc, pathv, &ds);
- objPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds));
- Tcl_DStringFree(&ds);
+ (void) Tcl_JoinPath(pathc, pathv, &ds);
+ objPtr = TclDStringToObj(&ds);
} else {
objPtr = Tcl_NewStringObj(buf, -1);
}