diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-13 09:15:38 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-13 09:15:38 +0100 |
commit | 103dbb9fd14fde35e116819808e6d4c9b534eaa2 (patch) | |
tree | 05e1b6c6f4db530894c6e19694a846975ed6587f /lib/libalpm/alpm_list.h | |
parent | 3da9fb537a0711ee12f66421703e5529ea5fca6a (diff) | |
download | pacman-103dbb9fd14fde35e116819808e6d4c9b534eaa2.tar.gz pacman-103dbb9fd14fde35e116819808e6d4c9b534eaa2.tar.xz |
* Refactored conflict checking within packages. Profiling from Dan showed an
unbelievable amount of strcmp() calls (25 million) due to the list searching.
This has been reimplemented with a set-intersection scheme, due to the fact
that file lists are always ordered. - NEEDS TESTING
* Minor clean up, "globalized" the str_cmp helper to match the alpm comparison
signature, so we can use it elsewhere.
Diffstat (limited to 'lib/libalpm/alpm_list.h')
-rw-r--r-- | lib/libalpm/alpm_list.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index 5798558b..be78245c 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -46,8 +46,8 @@ void alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn); /* item mutators */ alpm_list_t *alpm_list_add(alpm_list_t *list, void *data); alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn); -alpm_list_t* alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn); -alpm_list_t* alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn); +alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn); +alpm_list_t *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn); alpm_list_t *alpm_list_remove(alpm_list_t *haystack, void *needle, alpm_list_fn_cmp fn, void **data); alpm_list_t *alpm_list_remove_node(alpm_list_t *node); alpm_list_t *alpm_list_remove_dupes(alpm_list_t *list); @@ -56,7 +56,7 @@ alpm_list_t *alpm_list_reverse(alpm_list_t *list); /* item accessors */ alpm_list_t *alpm_list_first(alpm_list_t *list); -alpm_list_t* alpm_list_nth(alpm_list_t *list, int n); +alpm_list_t *alpm_list_nth(alpm_list_t *list, int n); alpm_list_t *alpm_list_next(alpm_list_t *list); alpm_list_t *alpm_list_last(alpm_list_t *list); void *alpm_list_getdata(const alpm_list_t *entry); |