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