diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-02-18 23:09:49 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-04-04 04:03:22 +0200 |
commit | a138db3c07553cfd252495a3c406e11457075e79 (patch) | |
tree | dd2e54b8339e28a3f20e2142f93be5f545ade2fc /lib/libalpm/alpm_list.h | |
parent | a202959a1973564474d39e2dbd76ca4ad1302eed (diff) | |
download | pacman-a138db3c07553cfd252495a3c406e11457075e79.tar.gz pacman-a138db3c07553cfd252495a3c406e11457075e79.tar.xz |
add alpm_list_append_strdup
Makes error detection and handling easier for a common operation.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm_list.h')
-rw-r--r-- | lib/libalpm/alpm_list.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index d7306cc5..1cb237d0 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -58,6 +58,7 @@ 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_append(alpm_list_t **list, void *data); +alpm_list_t *alpm_list_append_strdup(alpm_list_t **list, const char *data); alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn); alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second); alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn); |