Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : Provide problems_count
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Mon, 15 Jun 2009 13:36:11 +0200
  • Message-id: <E1MGAUQ-0005Uk-Kr@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 73d683fa71420e82532f3d5f8f0962ac39be584b
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Mon Jun 15 13:36:11 2009 +0200

Provide problems_count
---
bindings/solver.i | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bindings/solver.i b/bindings/solver.i
index 33f9e70..80fc3bb 100644
--- a/bindings/solver.i
+++ b/bindings/solver.i
@@ -896,9 +896,6 @@ typedef struct solver {} Solver;
* Returns true if any problems occured during solve, returns false
* on successful solve.
*
- * There is no 'number of problems' available, but it can be computed
- * by iterating over the problems.
- *
* call-seq:
* solver.problems? -> bool
*
@@ -906,6 +903,13 @@ typedef struct solver {} Solver;
int problems_found()
{ return $self->problems.count != 0; }

+ /*
+ * Return number of problems
+ *
+ */
+ int problems_count()
+ { return (int)solver_problem_count($self); }
+
#if defined(SWIGRUBY)
/*
* Iterate over problems.
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages