aboutsummaryrefslogtreecommitdiff
path: root/jim-file.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-10-26 13:37:22 +1000
committerSteve Bennett <steveb@workware.net.au>2010-12-16 08:10:39 +1000
commit22bf589c19e9a1239c3a5d7bf8fd6285343bd32c (patch)
treefad8dedea8c26ab4c050446854a50de6d2197581 /jim-file.c
parentd3ad7d2242d063f729892edfe47a1fde7f60915a (diff)
downloadjimtcl-22bf589c19e9a1239c3a5d7bf8fd6285343bd32c.zip
jimtcl-22bf589c19e9a1239c3a5d7bf8fd6285343bd32c.tar.gz
jimtcl-22bf589c19e9a1239c3a5d7bf8fd6285343bd32c.tar.bz2
Use the new Jim_EvalObjPrefix() for 'file copy'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-file.c')
-rw-r--r--jim-file.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/jim-file.c b/jim-file.c
index b2a7ccd..1dcf925 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -529,16 +529,7 @@ static int file_cmd_mtime(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
static int file_cmd_copy(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
- Jim_Obj *new_argv[4];
- int i;
-
- new_argv[0] = Jim_NewStringObj(interp, "file copy", -1);
- for (i = 0; i < argc; i++) {
- new_argv[i + 1] = argv[i];
- }
-
- /* Note that Jim_EvalObjVector() will incr then decr ref count of new_argv[0] */
- return Jim_EvalObjVector(interp, argc + 1, new_argv);
+ return Jim_EvalObjPrefix(interp, "file copy", argc, argv);
}
static int file_cmd_size(Jim_Interp *interp, int argc, Jim_Obj *const *argv)