From: Michael Schroeder Date: Thu, 22 Nov 2018 11:52:15 +0000 (+0100) Subject: Add a solvable_free() inline helper function X-Git-Tag: 0.7.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2662d8c101e1bf17ef70388a1da31cde34e4de22;p=thirdparty%2Flibsolv.git Add a solvable_free() inline helper function --- diff --git a/src/repo.h b/src/repo.h index e4bab443..58704f16 100644 --- a/src/repo.h +++ b/src/repo.h @@ -123,6 +123,14 @@ static inline int pool_installable(const Pool *pool, Solvable *s) return 1; } +/* not in solvable.h because we need the repo definition */ +static inline Solvable *solvable_free(Solvable *s, int reuseids) +{ + if (s && s->repo) + repo_free_solvable(s->repo, s - s->repo->pool->solvables, reuseids); + return 0; +} + /* search callback values */ #define SEARCH_NEXT_KEY 1 #define SEARCH_NEXT_SOLVABLE 2