(t: Option<&T>)
| 234 | /// syscall. |
| 235 | #[inline] |
| 236 | pub(super) fn opt_ref<T: Sized, Num: ArgNumber>(t: Option<&T>) -> ArgReg<'_, Num> { |
| 237 | // This optimizes into the equivalent of `transmute(t)`, and has the |
| 238 | // advantage of not requiring `unsafe`. |
| 239 | match t { |
| 240 | Some(t) => by_ref(t), |
| 241 | None => raw_arg(null_mut()), |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | /// Convert a `c_int` into an `ArgReg`. |
| 246 | /// |
no test coverage detected