diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-11-20 10:10:23 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-11-20 10:10:23 +0100 |
commit | aa1c0ba9f8787fc3b1a1190103e394b0c1c95922 (patch) | |
tree | ed0c9675f7fc5da043a69b36e0b8c6c8e05cb583 /lib/libalpm/list.h | |
parent | b8b9596b13de957566211b0e1db3e473ed66e147 (diff) | |
download | pacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.gz pacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.xz |
* repo-add script - to add entries to a db file directly from package data (no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a
typesafe _get_what_we_want(p) scheme [not 100% complete yet]
* some const correctness changes
* removal of PM_* types in alpm.h in favor of the pm*_t types used throughout
libalpm
Diffstat (limited to 'lib/libalpm/list.h')
-rw-r--r-- | lib/libalpm/list.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libalpm/list.h b/lib/libalpm/list.h index abff7819..3fdc01ad 100644 --- a/lib/libalpm/list.h +++ b/lib/libalpm/list.h @@ -21,13 +21,15 @@ #ifndef _ALPM_LIST_H #define _ALPM_LIST_H +#include "alpm.h" + /* Chained list struct */ -typedef struct __pmlist_t { +struct __pmlist_t { void *data; struct __pmlist_t *prev; struct __pmlist_t *next; struct __pmlist_t *last; /* Quick access to last item in list */ -} pmlist_t; +}; #define _FREELIST(p, f) do { if(p) { _alpm_list_free(p, f); p = NULL; } } while(0) #define FREELIST(p) _FREELIST(p, free) @@ -42,7 +44,7 @@ void _alpm_list_free(pmlist_t *list, _alpm_fn_free fn); pmlist_t *_alpm_list_add(pmlist_t *list, void *data); pmlist_t *_alpm_list_add_sorted(pmlist_t *list, void *data, _alpm_fn_cmp fn); pmlist_t *_alpm_list_remove(pmlist_t *haystack, void *needle, _alpm_fn_cmp fn, void **data); -int _alpm_list_count(pmlist_t *list); +int _alpm_list_count(const pmlist_t *list); int _alpm_list_is_in(void *needle, pmlist_t *haystack); int _alpm_list_is_strin(char *needle, pmlist_t *haystack); pmlist_t *_alpm_list_last(pmlist_t *list); |