Made the List generic, though more care needs to be taken when using it since memory leaks can happen when structs are used with it.
This commit is contained in:
+2
-2
@@ -1,6 +1,7 @@
|
||||
#ifndef LIST_H
|
||||
#define LIST_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -14,8 +15,7 @@ typedef struct {
|
||||
} List;
|
||||
|
||||
List* CreateList(void);
|
||||
int AddListItem(const char *, List *);
|
||||
void PrintList(const List*);
|
||||
int AddListItem(const void *, size_t, List *);
|
||||
void DestroyList(List*);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user