comments about struct list

This commit is contained in:
gdt 2003-12-22 16:07:52 +00:00
parent 297602162c
commit a7a9990f48

View File

@ -36,7 +36,12 @@ struct list
{ {
struct listnode *head; struct listnode *head;
struct listnode *tail; struct listnode *tail;
/* invariant: count is the number of listnodes in the list */
unsigned int count; unsigned int count;
/*
* Returns -1 if val1 < val2, 0 if equal?, 1 if val1 > val2.
* Used as definition of sorted for listnode_add_sort
*/
int (*cmp) (void *val1, void *val2); int (*cmp) (void *val1, void *val2);
void (*del) (void *val); void (*del) (void *val);
}; };