refactor to allow multiple hooks for one type
This commit is contained in:
20
include/list.h
Normal file
20
include/list.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef UC_LLIST_H
|
||||
#define UC_LLIST_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
struct list_item {
|
||||
struct list_item *next;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct list {
|
||||
struct list_item *head, *tail;
|
||||
};
|
||||
|
||||
struct list *list_new(void);
|
||||
void list_clear(struct list *list);
|
||||
void *list_append(struct list *list, void *data);
|
||||
bool list_remove(struct list *list, void *data);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user