about summary refs log tree commit diff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-02-07 18:55:02 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-02-07 19:57:03 -0800
commit93450abb4bf6a755b343ca459bbeff92540a7822 (patch)
treeee49c759c04ab7efb83025b9ed6b04878711ea39 /src/rt/rust.cpp
parent5131216fa6826509bb31672e5fde15b18eeff5d7 (diff)
downloadrust-93450abb4bf6a755b343ca459bbeff92540a7822.tar.gz
rust-93450abb4bf6a755b343ca459bbeff92540a7822.zip
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index b5af3942a20..dacbcee1045 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -41,16 +41,7 @@ command_line_args : public kernel_owned<command_line_args>
         LocalFree(wargv);
 #endif
 
-        args = (rust_vec *)
-            kernel->malloc(vec_size<rust_vec*>(argc),
-                           "command line arg interior");
-        args->fill = args->alloc = sizeof(rust_vec*) * argc;
-        for (int i = 0; i < argc; ++i) {
-            rust_str *str = make_str(kernel, argv[i],
-                                     strlen(argv[i]),
-                                     "command line arg");
-            ((rust_str**)&args->data)[i] = str;
-        }
+        args = make_str_vec(kernel, argc, argv);
     }
 
     ~command_line_args() {