예제 #1
0
파일: dict.c 프로젝트: Sts0mrg0/onion
/**
 * @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));
}
예제 #2
0
파일: dict.c 프로젝트: arunsirrpi/onion
/**
 * @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));
}