summaryrefslogtreecommitdiff
path: root/src/pacman/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/list.h')
-rw-r--r--src/pacman/list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pacman/list.h b/src/pacman/list.h
index 79a4a3c0..ba72d784 100644
--- a/src/pacman/list.h
+++ b/src/pacman/list.h
@@ -30,6 +30,14 @@ typedef struct __list_t {
} list_t;
#define FREELIST(p) do { if(p) { list_free(p); p = NULL; } } while(0)
+#define FREELISTPTR(p) do { \
+ list_t *i; \
+ for(i = p; i; i = i->next) { \
+ i->data = NULL; \
+ } \
+ FREELIST(p); \
+} while(0)
+
list_t *list_new(void);
void list_free(list_t* list);