// Produces a null-terminated array of pointers from strings
// (i.e. "char* const*" for use in execve-like calls).
Produces a null-terminated array of pointers from strings
.
Produces a null - terminated array of pointers from strings .
fn make_null_terminated_string_array(
    strings: &mut Vec<std::ffi::CString>,
) -> Vec<*mut libc::c_char> {
    let mut result = Vec::<*mut libc::c_char>::new();
    for s in strings {
        result.push(s.as_ptr() as *mut libc::c_char);
    }
    result.push(std::ptr::null::<libc::c_char>() as *mut libc::c_char);
    result
}
fn make_null_terminated_string_array ( strings : & mut Vec < std :: ffi :: CString > , ) -> Vec < * mut libc :: c_char > { let mut result = Vec :: < * mut libc :: c_char > :: new ( ) ; for s in strings { result . push ( s . as_ptr ( ) as * mut libc :: c_char ) ; } result . push ( std :: ptr :: null :: < libc :: c_char > ( ) as * mut libc :: c_char ) ; result }
Produces a null-terminated array of pointers from strings
(i.e.
Produces a null - terminated array of pointers from strings ( i . e .
strings
&mut Vec<std::ffi::CString>