E.g. socketpair is:
int socketpair(int domain, int type, int protocol, int sv[2]);
But we have
pub fn socketpair(domain: c_int, type_: c_int, protocol: c_int, socket_vector: *mut c_int) -> c_int;
*mut [c_int; 2] is ABI-compatible and more user-friendly, so we should consider using it and possibly updating ctest to require this kind of thing.
We may not be able to do this in general because technically in C, you can pass more than 2 items. But for most cases this shouldn't be a problem.
E.g. socketpair is:
But we have
*mut [c_int; 2]is ABI-compatible and more user-friendly, so we should consider using it and possibly updatingctestto require this kind of thing.We may not be able to do this in general because technically in C, you can pass more than 2 items. But for most cases this shouldn't be a problem.