summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2007-04-10 14:47:06 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2007-04-10 14:47:06 (GMT)
commit57f4a6789aaec0803fe66f725890dfa7b01dadad (patch)
treee12acd4bb445070087067812722f564f29218f8d /generic/tclFCmd.c
parente75e4b33e232e7de7d8650d080d21c75301eb61f (diff)
downloadtcl-57f4a6789aaec0803fe66f725890dfa7b01dadad.zip
tcl-57f4a6789aaec0803fe66f725890dfa7b01dadad.tar.gz
tcl-57f4a6789aaec0803fe66f725890dfa7b01dadad.tar.bz2
Handle creation of Tcl_Objs from constant strings better (easier to use, more
efficient). After [Patch 1529526] (afredd)
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index a7f5478..8de33fa 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclFCmd.c,v 1.37 2007/04/02 18:48:03 dgp Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.38 2007/04/10 14:47:14 dkf Exp $
*/
#include "tclInt.h"
@@ -568,8 +568,10 @@ CopyRenameOneFile(
*/
{
- Tcl_Obj* perm = Tcl_NewStringObj("u+w",-1);
+ Tcl_Obj *perm;
int index;
+
+ TclNewLiteralStringObj(perm, "u+w");
Tcl_IncrRefCount(perm);
if (TclFSFileAttrIndex(target, "-permissions", &index) == TCL_OK) {
Tcl_FSFileAttrsSet(NULL, index, target, perm);