summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2012-04-25 12:07:45 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2012-04-25 12:07:45 (GMT)
commit2d0545c937ed0e491f8e155dde41c9a62bd7dc86 (patch)
tree9287ec35f60eeed086288278741ae7b69817beda /unix/tclUnixFCmd.c
parenteaa02eccbd4b1111d5775d38bd135ef3425da6bb (diff)
downloadtcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.zip
tcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.tar.gz
tcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.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 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index e3d9022..fce071f 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -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;
}