9 #include "dmlite/common/config.h" void dmlite_any_dict_keys(const dmlite_any_dict *d, unsigned *nkeys, char ***keys)
Puts in keys a pointer to an array of strings with all the available keys in d.
dmlite_any * dmlite_any_new_string_array(unsigned n, const char **strv)
Creates a new dmlite_any.
long dmlite_any_to_long(const dmlite_any *any)
Returns the long interpretation of they dmlite_any.
struct dmlite_any_dict dmlite_any_dict
Handles key->value pairs.
Definition: any.h:25
uint64_t dmlite_any_to_u64(const dmlite_any *any)
Returns the uint64_t interpretation of they dmlite_any.
dmlite_any_dict * dmlite_any_dict_copy(const dmlite_any_dict *dict)
Make a copy of the dictionary.
dmlite_any * dmlite_any_new_long_array(unsigned n, long *lv)
Creates a new dmlite_any.
void dmlite_any_to_string(const dmlite_any *any, char *buffer, size_t bsize)
Gets the string interpretation of the dmlite_any.
int64_t dmlite_any_to_s64(const dmlite_any *any)
Returns the int64_t interpretation of they dmlite_any.
void dmlite_any_dict_clear(dmlite_any_dict *d)
Clears the dictionary.
void dmlite_any_dict_insert(dmlite_any_dict *d, const char *k, const dmlite_any *v)
Insert a new dmlite_any value into the dictionary.
void dmlite_any_dict_keys_free(unsigned n, char **keys)
Frees an array of strings allocated by dmlite_any_dict_keys.
unsigned long dmlite_any_dict_count(const dmlite_any_dict *d)
Returns how many elements there are in a specific dictionary.
void dmlite_any_free(dmlite_any *any)
Frees a dmlite_any.
char * dmlite_any_dict_to_json(const dmlite_any_dict *d, char *buffer, size_t bsize)
Generates a JSON serialization of the dictionary.
void dmlite_any_dict_free(dmlite_any_dict *d)
Frees a dmlite_any_dict.
dmlite_any * dmlite_any_new_u64(uint64_t i)
Creates a new dmlite_any from an uint64_t type.
dmlite_any_dict * dmlite_any_dict_from_json(const char *json)
Populates a dmlite_any_dict from a JSON string.
void dmlite_any_dict_erase(dmlite_any_dict *d, const char *k)
Removes a key-value from the dictionary.
dmlite_any * dmlite_any_new_string(const char *str)
Creates a new dmlite_any.
dmlite_any_dict * dmlite_any_dict_new()
Created a new generic dictionary.
struct dmlite_any dmlite_any
Used to pass configuration values.
Definition: any.h:20
dmlite_any * dmlite_any_dict_get(const dmlite_any_dict *d, const char *k)
Returns the value associated with the key k.
dmlite_any * dmlite_any_new_s64(int64_t i)
Creates a new dmlite_any from an int64_t type.
dmlite_any * dmlite_any_new_long(long l)
Creates a new dmlite_any.