You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include "mlist.h"
|
|
|
|
void mlist_destroy(mlist_t l){
|
|
mlistelem_t * elem, * next;
|
|
elem = l->first;
|
|
while (elem){
|
|
if (l->del != NULL){
|
|
l->del(mlistelem_dataptr(elem));
|
|
}
|
|
next = elem->next;
|
|
free(elem);
|
|
elem=next;
|
|
}
|
|
free(l);
|
|
}
|
|
|