diff options
author | morganamilo <morganamilo@archlinux.org> | 2022-01-09 16:58:55 +0000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2022-03-06 17:32:23 +1000 |
commit | 7340fb9b2e070ac90f07466212f4cc9248b0db4a (patch) | |
tree | c6e36feeea50aa53fe105600fb04fca457d1e85f | |
parent | 7ba2c276db962365460ad16fa1cb533936544fdf (diff) |
libalpm: mark filelist_contains as taking a const filelist
This is useful for bindings as it guarantees the value will not be
changed.
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | lib/libalpm/alpm.h | 2 | ||||
-rw-r--r-- | lib/libalpm/filelist.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 2a9200b5..6b66fa09 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -156,7 +156,7 @@ typedef struct _alpm_backup_t { * @param path the path to search for in the package * @return a pointer to the matching file or NULL if not found */ -alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path); +alpm_file_t *alpm_filelist_contains(const alpm_filelist_t *filelist, const char *path); /* End of libalpm_files */ /** @} */ diff --git a/lib/libalpm/filelist.c b/lib/libalpm/filelist.c index cef6b0d3..bfccc97d 100644 --- a/lib/libalpm/filelist.c +++ b/lib/libalpm/filelist.c @@ -118,7 +118,7 @@ static int _alpm_files_cmp(const void *f1, const void *f2) return strcmp(file1->name, file2->name); } -alpm_file_t SYMEXPORT *alpm_filelist_contains(alpm_filelist_t *filelist, +alpm_file_t SYMEXPORT *alpm_filelist_contains(const alpm_filelist_t *filelist, const char *path) { alpm_file_t key; |