Function CFArrayCreateMutableCopy

Source
pub unsafe extern "C-unwind" fn CFArrayCreateMutableCopy(
    allocator: Option<&CFAllocator>,
    capacity: CFIndex,
    the_array: Option<&CFArray>,
) -> Option<CFRetained<CFMutableArray>>
Available on crate features CFArray and CFBase only.
Expand description

Creates a new mutable array with the values from the given array.

Parameter allocator: The CFAllocator which should be used to allocate memory for the array and its storage for values. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.

Parameter capacity: A hint about the number of values that will be held by the CFArray. Pass 0 for no hint. The implementation may ignore this hint, or may use it to optimize various operations. An array’s actual capacity is only limited by address space and available memory constraints). This parameter must be greater than or equal to the count of the array which is to be copied, or the behavior is undefined. If this parameter is negative, the behavior is undefined.

Parameter theArray: The array which is to be copied. The values from the array are copied as pointers into the new array (that is, the values themselves are copied, not that which the values point to, if anything). However, the values are also retained by the new array. The count of the new array will be the same as the given array. The new array uses the same callbacks as the array to be copied. If this parameter is not a valid CFArray, the behavior is undefined.

Returns: A reference to the new mutable CFArray.