X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_hash.h;h=e72ffed88460a5c58d8af79a0e29258b4e88f52b;hp=d87927832229952b4f10e84c58fe7b39f7b2c0e3;hb=f13f4c18908c0b806abc80bac083c8cb4a76a239;hpb=e9405aa794b033500d17d75923b7358616b00c08 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,