From aa1c0ba9f8787fc3b1a1190103e394b0c1c95922 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 20 Nov 2006 09:10:23 +0000 Subject: * 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 --- lib/libalpm/list.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/list.h') 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); -- cgit v1.2.3