summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:46:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:46:48 (GMT)
commit26779f588a5178e773c4effc1c1ba604e9dda9fb (patch)
tree651f5be6f444e7c4b4fb789d3f11e9e608cd5085 /unix/tclUnixFCmd.c
parentaa8f3c2fc3166ccdb25c69c648c92c6a2b3b0aa2 (diff)
parent24ef33dc101a3e9114318b884c1e99d792f4739d (diff)
downloadtcl-dkf_alias_encoding.zip
tcl-dkf_alias_encoding.tar.gz
tcl-dkf_alias_encoding.tar.bz2
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index e3d9022..a695e9c 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -967,11 +967,11 @@ TraverseUnixTree(
return result;
}
- Tcl_DStringAppend(sourcePtr, "/", 1);
+ TclDStringAppendLiteral(sourcePtr, "/");
sourceLen = Tcl_DStringLength(sourcePtr);
if (targetPtr != NULL) {
- Tcl_DStringAppend(targetPtr, "/", 1);
+ TclDStringAppendLiteral(targetPtr, "/");
targetLen = Tcl_DStringLength(targetPtr);
}
@@ -1387,11 +1387,9 @@ GetOwnerAttribute(
*attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_uid);
} else {
Tcl_DString ds;
- const char *utf;
- utf = Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, -1, &ds);
- *attributePtrPtr = Tcl_NewStringObj(utf, Tcl_DStringLength(&ds));
- Tcl_DStringFree(&ds);
+ (void) Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, -1, &ds);
+ *attributePtrPtr = TclDStringToObj(&ds);
}
return TCL_OK;
}
@@ -2127,24 +2125,24 @@ TclpOpenTemporaryFile(
Tcl_DStringAppend(&template, DefaultTempDir(), -1); /* INTL: native */
}
- Tcl_DStringAppend(&template, "/", -1);
+ TclDStringAppendLiteral(&template, "/");
if (basenameObj) {
string = Tcl_GetStringFromObj(basenameObj, &len);
Tcl_UtfToExternalDString(NULL, string, len, &tmp);
- Tcl_DStringAppend(&template, Tcl_DStringValue(&tmp), -1);
+ TclDStringAppendDString(&template, &tmp);
Tcl_DStringFree(&tmp);
} else {
- Tcl_DStringAppend(&template, "tcl", -1);
+ TclDStringAppendLiteral(&template, "tcl");
}
- Tcl_DStringAppend(&template, "_XXXXXX", -1);
+ TclDStringAppendLiteral(&template, "_XXXXXX");
#ifdef HAVE_MKSTEMPS
if (extensionObj) {
string = Tcl_GetStringFromObj(extensionObj, &len);
Tcl_UtfToExternalDString(NULL, string, len, &tmp);
- Tcl_DStringAppend(&template, Tcl_DStringValue(&tmp), -1);
+ TclDStringAppendDString(&template, &tmp);
fd = mkstemps(Tcl_DStringValue(&template), Tcl_DStringLength(&tmp));
Tcl_DStringFree(&tmp);
} else