summaryrefslogtreecommitdiff
path: root/src/problems.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-02-14 18:18:18 +0100
committerMichael Schroeder <mls@suse.de>2012-02-14 18:18:18 +0100
commitd9da98eb5a9bc3f984ba3cff81e136cef1557d06 (patch)
tree991a1e00c2986cdb29734436b52590791c037f7b /src/problems.c
parent75b3cf4a0a60cf6115a1b0241dd4a568a44b0700 (diff)
downloadlibsolv-d9da98eb5a9bc3f984ba3cff81e136cef1557d06.tar.gz
libsolv-d9da98eb5a9bc3f984ba3cff81e136cef1557d06.tar.bz2
libsolv-d9da98eb5a9bc3f984ba3cff81e136cef1557d06.zip
- add pool_addvendorclass and solver_solutionelement_internalid
Diffstat (limited to 'src/problems.c')
-rw-r--r--src/problems.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/problems.c b/src/problems.c
index 976d99a..3a1409d 100644
--- a/src/problems.c
+++ b/src/problems.c
@@ -608,6 +608,7 @@ create_solutions(Solver *solv, int probnr, int solidx)
solv->solutions.elements[solstart] = (solv->solutions.count - (solstart + 1)) / 2;
queue_push(&solv->solutions, 0); /* add end marker */
queue_push(&solv->solutions, 0); /* add end marker */
+ queue_push(&solv->solutions, problem.elements[i]); /* just for bookkeeping */
solv->solutions.elements[solidx + 1 + nsol++] = solstart;
}
solv->solutions.elements[solidx + 1 + nsol] = 0; /* end marker */
@@ -688,6 +689,14 @@ solver_solutionelement_count(Solver *solv, Id problem, Id solution)
return solv->solutions.elements[solidx];
}
+Id
+solver_solutionelement_internalid(Solver *solv, Id problem, Id solution)
+{
+ Id solidx = solv->problems.elements[problem * 2 - 1];
+ solidx = solv->solutions.elements[solidx + solution];
+ return solv->solutions.elements[solidx + 2 * solv->solutions.elements[solidx] + 3];
+}
+
/*
* return the next item of the proposed solution