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); }
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); } }
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; } }