#include <kvstore.h> kv_error_t kv_create_value_copy(kv_store_t *store, kv_value_t **value, const unsigned char *data, int data_len)
Creates the value in a key/value store. To release the resources used by this structure, use kv_release_value().
This function differs from kv_create_value() in that it copies the contents of the data buffer passed to the function, so that the buffer can be released, or modified and then reused in whatever way is required by the application.
The store parameter is the handle to the store in which the value is stored. The store handle is obtained using kv_open_store().
The data parameter is a buffer containing the data to be contained in the value.
Note that the buffer used here is
copied. You may release or modify this memory as needed
because the contents of this memory is copied to memory
owned by the kv_value_t
structure.