#[repr(transparent)]
pub struct Object(pub(crate) NonNull<uacpi_sys::uacpi_object>);
pub impl Object {
pub fn new_uninitialized() -> Option<Self> {
unsafe { transmute(uacpi_sys::uacpi_object_create_uninitialized()) }
}
}
uacpi_sys::uacpi_object_create_uninitialized() is a extern function created by bindgen
uacpi_sys::uacpi_object is a ptr type to a opaque object in the c code.
The c code only hands out these pointer and interaction with the underlying object is done via function calls.
When creating a new object the c function can return a null ptr, is it safe to do this above?