Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm_list.h
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2007-11-16 20:50:58 +0100
committerDan McGee <dan@archlinux.org>2007-11-17 09:44:48 -0600
commitd311ad067f47608252b9276df90087db98b1100f (patch)
tree3b51cb2d4949d1bfdca0afcc88ca3a4be2ada4fa /lib/libalpm/alpm_list.h
parent04b7d2ad140058a7cab911fb77ec0285bf76b059 (diff)
Generalized alpm_list_find.
The old alpm_list_find was renamed to alpm_list_find_ptr, and a new alpm_list_find was introduced, which uses the fn comparison-function parameter in its decision. Now both alpm_list_find_ptr (a new ptrcmp helper function was also added) and alpm_list_find_str are just an alpm_list_find call. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: made ptrcmp a static function] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm_list.h')
-rw-r--r--lib/libalpm/alpm_list.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h
index d6e9882b..a24aa8db 100644
--- a/lib/libalpm/alpm_list.h
+++ b/lib/libalpm/alpm_list.h
@@ -72,8 +72,9 @@ void *alpm_list_getdata(const alpm_list_t *entry);
/* misc */
int alpm_list_count(const alpm_list_t *list);
-int alpm_list_find(const alpm_list_t *haystack, const void *needle);
-int alpm_list_find_str(const alpm_list_t *haystack,const char *needle);
+int alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn);
+int alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle);
+int alpm_list_find_str(const alpm_list_t *haystack, const char *needle);
alpm_list_t *alpm_list_diff(const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn);
#ifdef __cplusplus