Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-08-12 20:48:53 +1000
committerAllan McRae <allan@archlinux.org>2012-12-14 12:35:34 +1000
commit62f1c590fc26efe7047f7dcbeac8a0910cfb50a5 (patch)
tree1ef3f2289209fe26ba0c38c9f74cfb12ad9d8a92 /lib/libalpm/alpm.h
parent7a24f909fc21deb16271be5bc2cc5178f880c77a (diff)
Make alpm_pkg_find public
This function is particularly useful, so make it public. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 8d6edb81..d2d6055d 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -689,6 +689,13 @@ alpm_list_t *alpm_db_search(alpm_db_t *db, const alpm_list_t *needles);
int alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full,
alpm_siglevel_t level, alpm_pkg_t **pkg);
+/** Find a package in a list by name.
+ * @param haystack a list of alpm_pkg_t
+ * @param needle the package name
+ * @return a pointer to the package if found or NULL
+ */
+alpm_pkg_t *alpm_pkg_find(alpm_list_t *haystack, const char *needle);
+
/** Free a package.
* @param pkg package pointer to free
* @return 0 on success, -1 on error (pm_errno is set accordingly)