From f13f4c18908c0b806abc80bac083c8cb4a76a239 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 16 Feb 2017 00:01:58 +0100 Subject: [PATCH] libopkg: expose abstract_pkg_fetch_by_name() We need this function in other places later in order to be able to fetch abstract packages without implicitely creating them. Signed-off-by: Jo-Philipp Wich --- libopkg/pkg_hash.c | 5 ----- libopkg/pkg_hash.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index f5c0495..821cc71 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -221,11 +221,6 @@ int pkg_hash_load_status_files(void) return 0; } -static abstract_pkg_t *abstract_pkg_fetch_by_name(const char *pkg_name) -{ - return (abstract_pkg_t *) hash_table_get(&conf->pkg_hash, pkg_name); -} - pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg, int (*constraint_fcn) (pkg_t * pkg, diff --git a/libopkg/pkg_hash.h b/libopkg/pkg_hash.h index d879278..e72ffed 100644 --- a/libopkg/pkg_hash.h +++ b/libopkg/pkg_hash.h @@ -36,6 +36,11 @@ int pkg_hash_load_status_files(void); void hash_insert_pkg(pkg_t * pkg, int set_status); +static inline abstract_pkg_t *abstract_pkg_fetch_by_name(const char *pkg_name) +{ + return (abstract_pkg_t *) hash_table_get(&conf->pkg_hash, pkg_name); +} + abstract_pkg_t *ensure_abstract_pkg_by_name(const char *pkg_name); void pkg_hash_fetch_all_installed(pkg_vec_t * installed); pkg_t *pkg_hash_fetch_by_name_version(const char *pkg_name, -- 2.25.1