/** * @memberof onion_dict_t * @short Adds a value in the tree. * * Flags are or from onion_dict_flags_e, for example OD_DUP_ALL. * * @see onion_dict_flags_e */ void onion_dict_add(onion_dict *dict, const char *key, const void *value, int flags){ if (!key){ ONION_ERROR("Error, trying to add an empty key to a dictionary. There is a underliying bug here! Not adding anything."); return; } dict->root=onion_dict_node_add(dict, dict->root, onion_dict_node_new(key, value, flags)); }
/** * @memberof onion_dict_t * Adds a value in the tree. */ void onion_dict_add(onion_dict *dict, const char *key, const void *value, int flags){ dict->root=onion_dict_node_add(dict, dict->root, onion_dict_node_new(key, value, flags)); }