Function swift_runtime_sys::root::swift::swift_makeBoxUnique
source ยท pub unsafe extern "C" fn swift_makeBoxUnique(
buffer: *mut OpaqueValue,
type_: *const Metadata,
alignMask: usize,
) -> BoxPair
Expand description
Performs a uniqueness check on the pointer to a box structure. If the check fails allocates a new box and stores the pointer in the buffer.
if (!isUnique(buffer[0])) buffer[0] = swift_allocBox(type)