pub unsafe fn object_get_state(obj: *const Object) -> Result<State>
This function is unsafe because it may dereference raw pointers.