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:
committed by
Nicolas Williams
parent
f6d1dfd60f
commit
a578088705
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user