heim_data_ref_create: Use rk_UNCONST.

This API is used for both const and non-const strings, depending on
whether there is a deallocator passed or not, so the C type system
can't distinguish this for us.

XXX Perhaps this should be two separate APIs, one which takes
const-qualified pointers and one which takes non-const-qualified
pointers.
This commit is contained in:
Taylor R Campbell
2023-06-20 00:29:11 +00:00
committed by Nicolas Williams
parent f6d1dfd60f
commit a578088705

View File

@@ -116,7 +116,7 @@ heim_data_ref_create(const void *data, size_t length,
os = _heim_alloc_object(&_heim_data_object, sizeof(*os) + length);
if (os) {
os->data = (void *)data;
os->data = rk_UNCONST(data);
os->length = length;
deallocp = _heim_get_isaextra(os, 0);
*deallocp = dealloc;