]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add a solvable_free() inline helper function
authorMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:52:15 +0000 (12:52 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:52:15 +0000 (12:52 +0100)
src/repo.h

index e4bab44345fa7bb2d17f68319caaed58895ea699..58704f16724acbc35f6ff23fd7fe7c5dc42b3cf3 100644 (file)
@@ -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