From 70a0f5d3828a25fa831a7c1455afb5873502e41c Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Mon, 4 Feb 2008 13:41:07 +0000 Subject: [PATCH] added pool to arguments --- src/policy.c | 8 ++++---- src/solver.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/policy.c b/src/policy.c index b161a75..4b91238 100644 --- a/src/policy.c +++ b/src/policy.c @@ -300,7 +300,7 @@ prune_best_version_arch(Solver *solv, Pool *pool, Queue *plist) { if (solv && solv->bestSolvableCb) { /* The application is responsible for */ - return solv->bestSolvableCb (plist); + return solv->bestSolvableCb (solv->pool, plist); } if (plist->count > 1) @@ -334,7 +334,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2) if (solv && solv->archCheckCb) { /* The application is responsible for */ - return solv->archCheckCb (s1, s2); + return solv->archCheckCb (solv->pool, s1, s2); } /* we allow changes to/from noarch */ @@ -357,7 +357,7 @@ policy_illegal_vendorchange(Solver *solv, Solvable *s1, Solvable *s2) if (solv && solv->vendorCheckCb) { /* The application is responsible for */ - return solv->vendorCheckCb (s1, s2); + return solv->vendorCheckCb (solv->pool, s1, s2); } if (s1->vendor == s2->vendor) @@ -385,7 +385,7 @@ policy_findupdatepackages(Solver *solv, Solvable *s, Queue *qs, int allowall) if (solv && solv->updateCandidateCb) { /* The application is responsible for */ - return solv->updateCandidateCb (s, qs); + return solv->updateCandidateCb (solv->pool, s, qs); } /* diff --git a/src/solver.h b/src/solver.h index 9c7803c..7e6acf9 100644 --- a/src/solver.h +++ b/src/solver.h @@ -22,10 +22,10 @@ * Callback definitions in order to "overwrite" the policies by an external application. */ -typedef void (*BestSolvableCb) (Queue *canditates); -typedef int (*ArchCheckCb) (Solvable *solvable1, Solvable *solvable2); -typedef int (*VendorCheckCb) (Solvable *solvable1, Solvable *solvable2); -typedef void (*UpdateCandidateCb) (Solvable *solvable, Queue *canditates); +typedef void (*BestSolvableCb) (Pool *pool, Queue *canditates); +typedef int (*ArchCheckCb) (Pool *pool, Solvable *solvable1, Solvable *solvable2); +typedef int (*VendorCheckCb) (Pool *pool, Solvable *solvable1, Solvable *solvable2); +typedef void (*UpdateCandidateCb) (Pool *pool, Solvable *solvable, Queue *canditates); /* ---------------------------------------------- @@ -127,7 +127,7 @@ typedef struct solver { /* Finding best candidate * * Callback definition: - * void bestSolvable (Queue *canditates) + * void bestSolvable (Pool *pool, Queue *canditates) * candidates : List of canditates which has to be sorted by the function call * return candidates: Sorted list of the candidates(first is the best). */ @@ -136,7 +136,7 @@ typedef struct solver { /* Checking if two solvables has compatible architectures * * Callback definition: - * int archCheck (Solvable *solvable1, Solvable *solvable2); + * int archCheck (Pool *pool, Solvable *solvable1, Solvable *solvable2); * * return 0 it the two solvables has compatible architectures */ @@ -145,7 +145,7 @@ typedef struct solver { /* Checking if two solvables has compatible vendors * * Callback definition: - * int vendorCheck (Solvable *solvable1, Solvable *solvable2); + * int vendorCheck (Pool *pool, Solvable *solvable1, Solvable *solvable2); * * return 0 it the two solvables has compatible architectures */ @@ -154,7 +154,7 @@ typedef struct solver { /* Evaluate update candidate * * Callback definition: - * void pdateCandidateCb (Solvable *solvable, Queue *canditates) + * void pdateCandidateCb (Pool *pool, Solvable *solvable, Queue *canditates) * solvable : for which updates should be search * candidates : List of candidates (This list depends on other * restrictions like architecture and vendor policies too) -- 2.7.4