summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-02 06:45:52 +0100
committerDan McGee <dan@archlinux.org>2012-02-06 12:49:52 +0100
commitb488f229d2ec4f2e4b9e746d68422460ca664715 (patch)
tree31604f41d7c3780d3b76ac4bb87c10e676a16c54 /lib/libalpm/handle.c
parentf12effc6ff4605ea81b3b765ff1655107aad29d8 (diff)
downloadpacman-b488f229d2ec4f2e4b9e746d68422460ca664715.tar.gz
pacman-b488f229d2ec4f2e4b9e746d68422460ca664715.tar.xz
ALPM API adjustments for sanity and consistency
This makes several small adjustments to our exposed method names, and in one case, parameters. The justification here is to make methods less odd in their naming convention. If a method takes an alpm_db_t argument, the method should be named 'alpm_db_*', but perhaps more importantly, if it doesn't take a database as the first parameter, it should not. Summary of changes: alpm_db_register_sync -> alpm_register_syncdb alpm_db_unregister_all -> alpm_unregister_all_syncdbs alpm_option_get_localdb -> aplpm_get_localdb alpm_option_get_syncdbs -> aplpm_get_syncdbs alpm_db_readgroup -> alpm_db_get_group alpm_db_set_pkgreason -> alpm_pkg_set_reason All methods keep the same argument list except for alpm_pkg_set_reason; there we drop the 'handle' argument as it can be retrieved from the passed in package object. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 2187dca9..ec4cc56b 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -265,18 +265,6 @@ int SYMEXPORT alpm_option_get_checkspace(alpm_handle_t *handle)
return handle->checkspace;
}
-alpm_db_t SYMEXPORT *alpm_option_get_localdb(alpm_handle_t *handle)
-{
- CHECK_HANDLE(handle, return NULL);
- return handle->db_local;
-}
-
-alpm_list_t SYMEXPORT *alpm_option_get_syncdbs(alpm_handle_t *handle)
-{
- CHECK_HANDLE(handle, return NULL);
- return handle->dbs_sync;
-}
-
int SYMEXPORT alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb)
{
CHECK_HANDLE(handle, return -1);
@@ -635,4 +623,16 @@ alpm_siglevel_t SYMEXPORT alpm_option_get_default_siglevel(alpm_handle_t *handle
return handle->siglevel;
}
+alpm_db_t SYMEXPORT *alpm_get_localdb(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->db_local;
+}
+
+alpm_list_t SYMEXPORT *alpm_get_syncdbs(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->dbs_sync;
+}
+
/* vim: set ts=2 sw=2 noet: */