libpkgconf: pkg_cache becomes pkgconf_cache

pull/81/head
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; 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, * looks up a package in the cache given an 'id' atom,
* such as 'gtk+-3.0' and returns the already loaded version * such as 'gtk+-3.0' and returns the already loaded version
* if present. * if present.
*/ */
pkg_t * pkg_t *
pkg_cache_lookup(const char *id) pkgconf_cache_lookup(const char *id)
{ {
pkgconf_node_t *node; 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. * adds an entry for the package to the package cache.
* the cache entry must be removed if the package is freed. * the cache entry must be removed if the package is freed.
*/ */
void void
pkg_cache_add(pkg_t *pkg) pkgconf_cache_add(pkg_t *pkg)
{ {
if (pkg == NULL) if (pkg == NULL)
return; 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. * deletes a package from the cache entry.
*/ */
void void
pkg_cache_remove(pkg_t *pkg) pkgconf_cache_remove(pkg_t *pkg)
{ {
if (pkg == NULL) if (pkg == NULL)
return; return;
@ -72,7 +72,7 @@ pkg_cache_remove(pkg_t *pkg)
} }
void void
pkg_cache_free(void) pkgconf_cache_free(void)
{ {
pkgconf_node_t *iter, *iter2; 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); bool pkg_queue_validate(pkgconf_list_t *list, int maxdepth, unsigned int flags);
/* cache.c */ /* cache.c */
pkg_t *pkg_cache_lookup(const char *id); pkg_t *pkgconf_cache_lookup(const char *id);
void pkg_cache_add(pkg_t *pkg); void pkgconf_cache_add(pkg_t *pkg);
void pkg_cache_remove(pkg_t *pkg); void pkgconf_cache_remove(pkg_t *pkg);
void pkg_cache_free(void); void pkgconf_cache_free(void);
#endif #endif

View File

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

2
main.c
View File

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