summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-09 16:00:55 -0500
committerDan McGee <dan@archlinux.org>2011-06-13 19:32:59 -0500
commitfb3ad7f8823dd3300528b44427d40e17594b1400 (patch)
tree8932518e67553383a178d23fcdd07beb24dc801e /lib/libalpm/alpm.h
parent01ad3faee934aa805237bf5405e7c74dc1482a17 (diff)
downloadpacman-fb3ad7f8823dd3300528b44427d40e17594b1400.tar.xz
Add handle argument to alpm_(add|remove)_pkg()
This makes these functions consistent with the rest of the transaction related API calls. We do an additional assert to ensure the handle attached to the package is the same as the handle passed in. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 21444017..8742eacd 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -867,16 +867,18 @@ int alpm_sync_sysupgrade(pmhandle_t *handle, int enable_downgrade);
/** Add a package to the transaction.
* If the package was loaded by alpm_pkg_load(), it will be freed upon
* alpm_trans_release() invocation.
+ * @param handle the context handle
* @param pkg the package to add
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_add_pkg(pmpkg_t *pkg);
+int alpm_add_pkg(pmhandle_t *handle, pmpkg_t *pkg);
/** Add a package removal action to the transaction.
+ * @param handle the context handle
* @param pkg the package to uninstall
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_remove_pkg(pmpkg_t *pkg);
+int alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg);
/** @} */