libpkgconf: pkg_cache becomes pkgconf_cache

feature/tap-sh
William Pitcock 2015-09-06 10:50:23 -05:00
parent b17f264032
commit 342950a5e4
4 changed files with 15 additions and 15 deletions

View File

@ -18,14 +18,14 @@
static pkgconf_list_t pkg_cache = PKGCONF_LIST_INITIALIZER;
/*
* pkg_cache_lookup(id)
* pkgconf_cache_lookup(id)
*
* looks up a package in the cache given an 'id' atom,
* such as 'gtk+-3.0' and returns the already loaded version
* if present.
*/
pkg_t *
pkg_cache_lookup(const char *id)
pkgconf_cache_lookup(const char *id)
{
pkgconf_node_t *node;
@ -41,13 +41,13 @@ pkg_cache_lookup(const char *id)
}
/*
* pkg_cache_add(pkg)
* pkgconf_cache_add(pkg)
*
* adds an entry for the package to the package cache.
* the cache entry must be removed if the package is freed.
*/
void
pkg_cache_add(pkg_t *pkg)
pkgconf_cache_add(pkg_t *pkg)
{
if (pkg == NULL)
return;
@ -58,12 +58,12 @@ pkg_cache_add(pkg_t *pkg)
}
/*
* pkg_cache_remove(pkg)
* pkgconf_cache_remove(pkg)
*
* deletes a package from the cache entry.
*/
void
pkg_cache_remove(pkg_t *pkg)
pkgconf_cache_remove(pkg_t *pkg)
{
if (pkg == NULL)
return;
@ -72,7 +72,7 @@ pkg_cache_remove(pkg_t *pkg)
}
void
pkg_cache_free(void)
pkgconf_cache_free(void)
{
pkgconf_node_t *iter, *iter2;

View File

@ -189,9 +189,9 @@ bool pkg_queue_apply(pkgconf_list_t *list, pkg_queue_apply_func_t func, int maxd
bool pkg_queue_validate(pkgconf_list_t *list, int maxdepth, unsigned int flags);
/* cache.c */
pkg_t *pkg_cache_lookup(const char *id);
void pkg_cache_add(pkg_t *pkg);
void pkg_cache_remove(pkg_t *pkg);
void pkg_cache_free(void);
pkg_t *pkgconf_cache_lookup(const char *id);
void pkgconf_cache_add(pkg_t *pkg);
void pkgconf_cache_remove(pkg_t *pkg);
void pkgconf_cache_free(void);
#endif

View File

@ -281,7 +281,7 @@ pkg_free(pkg_t *pkg)
if (pkg == NULL || pkg->flags & PKG_PROPF_VIRTUAL)
return;
pkg_cache_remove(pkg);
pkgconf_cache_remove(pkg);
pkgconf_dependency_free(&pkg->requires);
pkgconf_dependency_free(&pkg->requires_private);
@ -474,7 +474,7 @@ pkg_find(const char *name, unsigned int flags)
/* check cache */
if (!(flags & PKGF_NO_CACHE))
{
if ((pkg = pkg_cache_lookup(name)) != NULL)
if ((pkg = pkgconf_cache_lookup(name)) != NULL)
{
pkg->flags |= PKG_PROPF_CACHED;
return pkg;
@ -498,7 +498,7 @@ pkg_find(const char *name, unsigned int flags)
#endif
out:
pkg_cache_add(pkg);
pkgconf_cache_add(pkg);
return pkg;
}

2
main.c
View File

@ -1003,7 +1003,7 @@ out_println:
out:
pkgconf_tuple_free_global();
pkg_cache_free();
pkgconf_cache_free();
return ret;
}