Example #1
0
R_API void r_list_delete (RList *list, RListIter *iter) {
	r_list_split_iter (list, iter);
	if (list->free && iter->data)
		list->free (iter->data);
	iter->data = NULL;
	free (iter);
}
Example #2
0
File: list.c Project: jduck/radare2
R_API void r_list_delete(RList *list, RListIter *iter) {
	if (list && iter) {
		r_list_split_iter (list, iter);
		if (list->free && iter->data) {
			list->free (iter->data);
		}
		iter->data = NULL;
		R_FREE (iter);
	}
}
Example #3
0
R_API void r_list_split (RList *list, void *ptr) {
	RListIter *iter = r_list_iterator (list);
	while (iter) {
		void *item = iter->data;
		if (ptr == item) {
			r_list_split_iter (list, iter);
			free (iter);
			break;
		}
		iter = iter->n;
	}
}