diff options
author | Allan McRae <allan@archlinux.org> | 2011-06-29 07:52:33 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2011-06-29 07:52:33 +0200 |
commit | b1894ccf062059972d39fa855ee7941b666c5db0 (patch) | |
tree | ff2da312f683393961487b741ea02ea89b0a0c13 /lib | |
parent | f1bb56cebfda9b11ea02754d325ff659014e2caa (diff) | |
download | pacman-b1894ccf062059972d39fa855ee7941b666c5db0.tar.gz pacman-b1894ccf062059972d39fa855ee7941b666c5db0.tar.xz |
Rename internal functions with grp in their name
The following function renames take place for the same reasoning as
the previous commit:
_alpm_grp_new -> _alpm_group_new
_alpm_grp_free -> _alpm_group_free
_alpm_db_free_grpcache -> _alpm_db_free_groupcache
_alpm_db_get_grpfromcache -> _alpm_db_get_groupfromcache
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/db.c | 18 | ||||
-rw-r--r-- | lib/libalpm/db.h | 4 | ||||
-rw-r--r-- | lib/libalpm/group.c | 4 | ||||
-rw-r--r-- | lib/libalpm/group.h | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index ecb792c9..f6f810c0 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -246,7 +246,7 @@ alpm_group_t SYMEXPORT *alpm_db_readgroup(alpm_db_t *db, const char *name) ASSERT(name != NULL && strlen(name) != 0, RET_ERR(db->handle, PM_ERR_WRONG_ARGS, NULL)); - return _alpm_db_get_grpfromcache(db, name); + return _alpm_db_get_groupfromcache(db, name); } /** Get the group cache of a package database. */ @@ -481,7 +481,7 @@ void _alpm_db_free_pkgcache(alpm_db_t *db) _alpm_pkghash_free(db->pkgcache); db->status &= ~DB_STATUS_PKGCACHE; - _alpm_db_free_grpcache(db); + _alpm_db_free_groupcache(db); } alpm_pkghash_t *_alpm_db_get_pkgcache_hash(alpm_db_t *db) @@ -530,7 +530,7 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg) alpm_pkg_get_name(newpkg), db->treename); db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg); - _alpm_db_free_grpcache(db); + _alpm_db_free_groupcache(db); return 0; } @@ -556,7 +556,7 @@ int _alpm_db_remove_pkgfromcache(alpm_db_t *db, alpm_pkg_t *pkg) _alpm_pkg_free(data); - _alpm_db_free_grpcache(db); + _alpm_db_free_groupcache(db); return 0; } @@ -613,9 +613,9 @@ static int load_grpcache(alpm_db_t *db) continue; } /* we didn't find the group, so create a new one with this name */ - grp = _alpm_grp_new(grpname); + grp = _alpm_group_new(grpname); if(!grp) { - _alpm_db_free_grpcache(db); + _alpm_db_free_groupcache(db); return -1; } grp->packages = alpm_list_add(grp->packages, pkg); @@ -627,7 +627,7 @@ static int load_grpcache(alpm_db_t *db) return 0; } -void _alpm_db_free_grpcache(alpm_db_t *db) +void _alpm_db_free_groupcache(alpm_db_t *db) { alpm_list_t *lg; @@ -639,7 +639,7 @@ void _alpm_db_free_grpcache(alpm_db_t *db) "freeing group cache for repository '%s'\n", db->treename); for(lg = db->grpcache; lg; lg = lg->next) { - _alpm_grp_free(lg->data); + _alpm_group_free(lg->data); lg->data = NULL; } FREELIST(db->grpcache); @@ -663,7 +663,7 @@ alpm_list_t *_alpm_db_get_groupcache(alpm_db_t *db) return db->grpcache; } -alpm_group_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target) +alpm_group_t *_alpm_db_get_groupfromcache(alpm_db_t *db, const char *target) { alpm_list_t *i; diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index 5bf05d87..7055abd8 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -102,9 +102,9 @@ alpm_list_t *_alpm_db_get_pkgcache(alpm_db_t *db); int _alpm_db_ensure_pkgcache(alpm_db_t *db, alpm_dbinfrq_t infolevel); alpm_pkg_t *_alpm_db_get_pkgfromcache(alpm_db_t *db, const char *target); /* groups */ -void _alpm_db_free_grpcache(alpm_db_t *db); +void _alpm_db_free_groupcache(alpm_db_t *db); alpm_list_t *_alpm_db_get_groupcache(alpm_db_t *db); -alpm_group_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target); +alpm_group_t *_alpm_db_get_groupfromcache(alpm_db_t *db, const char *target); #endif /* _ALPM_DB_H */ diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index aefa7be8..47458df2 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -30,7 +30,7 @@ #include "log.h" #include "alpm.h" -alpm_group_t *_alpm_grp_new(const char *name) +alpm_group_t *_alpm_group_new(const char *name) { alpm_group_t* grp; @@ -40,7 +40,7 @@ alpm_group_t *_alpm_grp_new(const char *name) return grp; } -void _alpm_grp_free(alpm_group_t *grp) +void _alpm_group_free(alpm_group_t *grp) { if(grp == NULL) { return; diff --git a/lib/libalpm/group.h b/lib/libalpm/group.h index ad38c768..078c9af7 100644 --- a/lib/libalpm/group.h +++ b/lib/libalpm/group.h @@ -22,8 +22,8 @@ #include "alpm.h" -alpm_group_t *_alpm_grp_new(const char *name); -void _alpm_grp_free(alpm_group_t *grp); +alpm_group_t *_alpm_group_new(const char *name); +void _alpm_group_free(alpm_group_t *grp); #endif /* _ALPM_GROUP_H */ |