diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-10-26 13:37:22 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-12-16 08:10:39 +1000 |
commit | 22bf589c19e9a1239c3a5d7bf8fd6285343bd32c (patch) | |
tree | fad8dedea8c26ab4c050446854a50de6d2197581 /jim-file.c | |
parent | d3ad7d2242d063f729892edfe47a1fde7f60915a (diff) | |
download | jimtcl-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.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -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) |