Gets a pointer to the raw bytes of a data object from an array directly.
SDKs
- macOS 10.7+
- Mac Catalyst 13.0+
Framework
- XPC
Declaration
const void * xpc_array_get_data(xpc _object _t xarray, size _t index, size _t *length);
Parameters
xarray
The array which is to be examined.
index
The index of the value to obtain. This value must lie within the index space of the array (0 to N-1 inclusive, where N is the count of the array). If the index is outside that range, the behavior is undefined.
length
Upon return output, will contain the length of the data corresponding to the specified key.
Return Value
The underlying bytes at the specified index. NULL if the value at the specified index is not a data value.