AC-Tube
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.
 
 
 
 
 
actube/src/cw/mlist_get.c

12 lines
248 B

#include "mlist.h"
struct mlistelem * mlist_get(mlist_t list, const void *data){
struct mlistelem * elem;
mlist_foreach(elem,list){
void *tdata = mlistelem_dataptr(elem);
if (list->cmp(tdata,data)==0){
return elem;
}
}
return NULL;
}