sdl3/
util.rs

1pub fn option_to_ptr<T>(opt: Option<&T>) -> *const T {
2    opt.map_or(std::ptr::null(), |v| v as *const _)
3}