mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
f1bb56cebf
commit
b1894ccf06
@ -246,7 +246,7 @@ alpm_group_t SYMEXPORT *alpm_db_readgroup(alpm_db_t *db, const char *name)
|
|||||||
ASSERT(name != NULL && strlen(name) != 0,
|
ASSERT(name != NULL && strlen(name) != 0,
|
||||||
RET_ERR(db->handle, PM_ERR_WRONG_ARGS, NULL));
|
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. */
|
/** 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);
|
_alpm_pkghash_free(db->pkgcache);
|
||||||
db->status &= ~DB_STATUS_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)
|
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);
|
alpm_pkg_get_name(newpkg), db->treename);
|
||||||
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
|
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
|
||||||
|
|
||||||
_alpm_db_free_grpcache(db);
|
_alpm_db_free_groupcache(db);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -556,7 +556,7 @@ int _alpm_db_remove_pkgfromcache(alpm_db_t *db, alpm_pkg_t *pkg)
|
|||||||
|
|
||||||
_alpm_pkg_free(data);
|
_alpm_pkg_free(data);
|
||||||
|
|
||||||
_alpm_db_free_grpcache(db);
|
_alpm_db_free_groupcache(db);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -613,9 +613,9 @@ static int load_grpcache(alpm_db_t *db)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* we didn't find the group, so create a new one with this name */
|
/* 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) {
|
if(!grp) {
|
||||||
_alpm_db_free_grpcache(db);
|
_alpm_db_free_groupcache(db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
grp->packages = alpm_list_add(grp->packages, pkg);
|
grp->packages = alpm_list_add(grp->packages, pkg);
|
||||||
@ -627,7 +627,7 @@ static int load_grpcache(alpm_db_t *db)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _alpm_db_free_grpcache(alpm_db_t *db)
|
void _alpm_db_free_groupcache(alpm_db_t *db)
|
||||||
{
|
{
|
||||||
alpm_list_t *lg;
|
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);
|
"freeing group cache for repository '%s'\n", db->treename);
|
||||||
|
|
||||||
for(lg = db->grpcache; lg; lg = lg->next) {
|
for(lg = db->grpcache; lg; lg = lg->next) {
|
||||||
_alpm_grp_free(lg->data);
|
_alpm_group_free(lg->data);
|
||||||
lg->data = NULL;
|
lg->data = NULL;
|
||||||
}
|
}
|
||||||
FREELIST(db->grpcache);
|
FREELIST(db->grpcache);
|
||||||
@ -663,7 +663,7 @@ alpm_list_t *_alpm_db_get_groupcache(alpm_db_t *db)
|
|||||||
return db->grpcache;
|
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;
|
alpm_list_t *i;
|
||||||
|
|
||||||
|
@ -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);
|
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);
|
alpm_pkg_t *_alpm_db_get_pkgfromcache(alpm_db_t *db, const char *target);
|
||||||
/* groups */
|
/* 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_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 */
|
#endif /* _ALPM_DB_H */
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "alpm.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;
|
alpm_group_t* grp;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ alpm_group_t *_alpm_grp_new(const char *name)
|
|||||||
return grp;
|
return grp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _alpm_grp_free(alpm_group_t *grp)
|
void _alpm_group_free(alpm_group_t *grp)
|
||||||
{
|
{
|
||||||
if(grp == NULL) {
|
if(grp == NULL) {
|
||||||
return;
|
return;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
|
|
||||||
alpm_group_t *_alpm_grp_new(const char *name);
|
alpm_group_t *_alpm_group_new(const char *name);
|
||||||
void _alpm_grp_free(alpm_group_t *grp);
|
void _alpm_group_free(alpm_group_t *grp);
|
||||||
|
|
||||||
#endif /* _ALPM_GROUP_H */
|
#endif /* _ALPM_GROUP_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user