Make process-spawning take environments and working directories, remove procsrv task from compiletest.

This commit is contained in:
Graydon Hoare
2012-02-07 18:55:02 -08:00
parent 5131216fa6
commit 93450abb4b
18 changed files with 328 additions and 286 deletions

View File

@@ -1077,6 +1077,18 @@ FIXME: We don't need this wrapper
*/
unsafe fn to_ptr<T>(v: [T]) -> *T { ret unsafe::to_ptr(v); }
/*
Function: as_buf
Work with the buffer of a vector. Allows for unsafe manipulation
of vector contents, which is useful for native interop.
*/
fn as_buf<E,T>(v: [const E], f: fn(*E) -> T) -> T unsafe {
let buf = unsafe::to_ptr(v); f(buf)
}
/*
Module: unsafe
*/