Hi,
Couldn't find this in reference.
In particular, if I have
let mut pointer: *mut () = some_pointer_returner();
pointer = pointer.offset(1);
will it be moved by 1 byte? Or some other value?
Thanks
Hi,
Couldn't find this in reference.
In particular, if I have
let mut pointer: *mut () = some_pointer_returner();
pointer = pointer.offset(1);
will it be moved by 1 byte? Or some other value?
Thanks
Thanks for help.
I read Rustonomicon though I somehow missed that () is zero-sized.
Guess I should use *u8 for raw pointers instead
If you're interfacing with C, use libc's c_void
(unless you're actually handling bytes).
I'm actually juggling with bytes, so it should be u8 I think