Hi all, it's again me.
I have a C function returns array of null terminated strings. And I need to
convert it to an Rust string type.
C function declaration:
const char** func();
Rust code:
native mod c {
fn func() -> **libc::c_char;
}
#[test]
fn test_func() {
let results = c::func();
// how to print all string in results???
}
I've tried next idea without success:
let v: [str] = methods; // mismatched types: expected `[str]` but found
`**core::libc::types::os::arch::c95::c_char` (vector vs *-ptr)
What is the best way to do it?
Regards,
Alexander.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev