summaryrefslogtreecommitdiff
path: root/src/repo.h
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2011-12-23 14:27:51 +0100
committerMichael Schroeder <mls@suse.de>2011-12-23 14:27:51 +0100
commitdd0db6ec9b3981f4e3254dd92b7eee3d8abc4f8a (patch)
tree2499bfa005484464642e4b62c9e0859ea76a6919 /src/repo.h
parente8dbbef9e187f5c71f9e53c638b8ab5db8f9bea0 (diff)
downloadlibsolv-dd0db6ec9b3981f4e3254dd92b7eee3d8abc4f8a.tar.gz
libsolv-dd0db6ec9b3981f4e3254dd92b7eee3d8abc4f8a.tar.bz2
libsolv-dd0db6ec9b3981f4e3254dd92b7eee3d8abc4f8a.zip
- add repo_id2repodata, fix loop start in maybe_load_repodata()
Diffstat (limited to 'src/repo.h')
-rw-r--r--src/repo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/repo.h b/src/repo.h
index 52bec4a..ed52d0c 100644
--- a/src/repo.h
+++ b/src/repo.h
@@ -74,6 +74,11 @@ static inline const char *repo_name(const Repo *repo)
return repo->name;
}
+static inline Repodata *repo_id2repodata(Repo *repo, Id id)
+{
+ return id ? repo->repodata + id : 0;
+}
+
#define FOR_REPO_SOLVABLES(r, p, s) \
for (p = (r)->start, s = (r)->pool->solvables + p; p < (r)->end; p++, s = (r)->pool->solvables + p) \
if (s->repo == (r))