José and Clark, An explicit cast as *mut libc::c_void was required to satisfy the type checker. Works now, thanks! -- Connor
> On Nov 25, 2014, at 14:15, José Armando García Sancio <[email protected]> > wrote: > > Hey Connor, > > Small world. Jose here. I suspect that you want to get a slice from the Vec. > Slices have two data members: data and len. > > Hope that helps, > -Jose > > On Tue Nov 25 2014 at 2:06:23 PM Connor Doyle <[email protected]> wrote: > Hi all, > > First time on the mailing list! > > I'm having trouble setting a raw void pointer in a struct using a recent (72 > hrs) nightly. > I'd like to address the underlying bytes for a Vec<u8> I have in-hand. > > The FFI guide is a little thin in this area, glad to add detail once I figure > out how this is done. > > For reference, here is the target struct: > > extern crate libc; > > #[repr(C)] > pub struct ProtobufObj { > pub data: *mut libc::c_void, > pub size: libc::size_t, > } > > Thanks, > -- > Connor > > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
