summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index a9c1613..0d6db51 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.41 2007/06/28 21:10:38 patthoyts Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.42 2007/09/17 10:44:04 dkf Exp $
*/
#include "tclInt.h"
@@ -694,20 +694,20 @@ CopyRenameOneFile(
* cross-filesystem copy. We do this through our Tcl library.
*/
- Tcl_Obj *copyCommand = Tcl_NewListObj(0, NULL);
+ Tcl_Obj *copyCommand, *cmdObj, *opObj;
- Tcl_IncrRefCount(copyCommand);
- Tcl_ListObjAppendElement(interp, copyCommand,
- Tcl_NewStringObj("::tcl::CopyDirectory",-1));
+ TclNewObj(copyCommand);
+ TclNewLiteralStringObj(cmdObj, "::tcl::CopyDirectory");
+ Tcl_ListObjAppendElement(interp, copyCommand, cmdObj);
if (copyFlag) {
- Tcl_ListObjAppendElement(interp, copyCommand,
- Tcl_NewStringObj("copying",-1));
+ TclNewLiteralStringObj(opObj, "copying");
} else {
- Tcl_ListObjAppendElement(interp, copyCommand,
- Tcl_NewStringObj("renaming",-1));
+ TclNewLiteralStringObj(opObj, "renaming");
}
+ Tcl_ListObjAppendElement(interp, copyCommand, opObj);
Tcl_ListObjAppendElement(interp, copyCommand, source);
Tcl_ListObjAppendElement(interp, copyCommand, target);
+ Tcl_IncrRefCount(copyCommand);
result = Tcl_EvalObjEx(interp, copyCommand,
TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT);
Tcl_DecrRefCount(copyCommand);