private.h 344 B

123456789101112131415
  1. #include "lub/list.h"
  2. struct lub_list_node_s {
  3. lub_list_node_t *prev;
  4. lub_list_node_t *next;
  5. void *data;
  6. };
  7. struct lub_list_s {
  8. lub_list_node_t *head;
  9. lub_list_node_t *tail;
  10. lub_list_compare_fn *compareFn; // Function to compare two list elements
  11. lub_list_free_fn *freeFn; // Function to properly free data field
  12. unsigned int len;
  13. };