Open
Description
oc_rep_get functions that const oc_rep_t*
and return value stored for given key.
Example:
bool oc_rep_get_string(const oc_rep_t *rep, const char *key, char **value,
size_t *size);
The problem is that the value is a pointer to member of the provided const oc_rep_t*
and therefore the returned value should also be const
.
Functions oc_rep_get_byte_string
, oc_rep_get_string
, oc_rep_get_int_array
, oc_rep_get_bool_array
, oc_rep_get_double_array
, oc_rep_get_byte_string_array
, oc_rep_get_string_array
, oc_rep_get_object
oc_rep_get_object_array
should be modified to return const**
value.
(This will however break API so we should issue at least a warning in the changelog).