From 342950a5e4125ff3b599cf7379cc8621bdb6b749 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 Sep 2015 10:50:23 -0500 Subject: [PATCH] libpkgconf: pkg_cache becomes pkgconf_cache --- libpkgconf/cache.c | 14 +++++++------- libpkgconf/libpkgconf.h | 8 ++++---- libpkgconf/pkg.c | 6 +++--- main.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libpkgconf/cache.c b/libpkgconf/cache.c index 64246d5..ca6fc0f 100644 --- a/libpkgconf/cache.c +++ b/libpkgconf/cache.c @@ -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; diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index 4d8fcad..9b09773 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -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 diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 40a236a..aa9fb25 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -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; } diff --git a/main.c b/main.c index 25f29ee..71fdd7d 100644 --- a/main.c +++ b/main.c @@ -1003,7 +1003,7 @@ out_println: out: pkgconf_tuple_free_global(); - pkg_cache_free(); + pkgconf_cache_free(); return ret; }