mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
- fixed args order in list_is_ptrin()
This commit is contained in:
parent
77520f9d43
commit
170dd807f5
@ -217,7 +217,7 @@ int pm_list_count(PMList *list)
|
||||
return(i);
|
||||
}
|
||||
|
||||
int pm_list_is_ptrin(PMList *haystack, void *needle)
|
||||
int pm_list_is_ptrin(void *needle, PMList *haystack)
|
||||
{
|
||||
PMList *lp;
|
||||
|
||||
@ -272,4 +272,16 @@ PMList* _alpm_list_reverse(PMList *list)
|
||||
return(newlist);
|
||||
}
|
||||
|
||||
PMList *_alpm_list_strdup(PMList *list)
|
||||
{
|
||||
PMList *newlist = NULL;
|
||||
PMList *lp;
|
||||
|
||||
for(lp = list; lp; lp = lp->next) {
|
||||
newlist = pm_list_add(newlist, strdup(lp->data));
|
||||
}
|
||||
|
||||
return(newlist);
|
||||
}
|
||||
|
||||
/* vim: set ts=2 sw=2 noet: */
|
||||
|
@ -52,10 +52,11 @@ PMList *pm_list_add(PMList *list, void *data);
|
||||
PMList *pm_list_add_sorted(PMList *list, void *data, pm_fn_cmp fn);
|
||||
PMList* _alpm_list_remove(PMList* list, PMList* item);
|
||||
int pm_list_count(PMList *list);
|
||||
int pm_list_is_ptrin(PMList *haystack, void *needle);
|
||||
int pm_list_is_ptrin(void *needle, PMList *haystack);
|
||||
PMList *pm_list_is_strin(char *needle, PMList *haystack);
|
||||
PMList *pm_list_last(PMList *list);
|
||||
PMList *_alpm_list_reverse(PMList *list);
|
||||
PMList *_alpm_list_strdup(PMList *list);
|
||||
|
||||
#endif /* _ALPM_LIST_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user