diff options
author | Michael Schroeder <mls@suse.de> | 2013-08-21 14:39:14 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-08-21 14:39:14 +0200 |
commit | 65a287ed2a04cda74bc17b62ab54c180d0ac5dbf (patch) | |
tree | 73a8d166463b526c856503a26e8925649bc64c5c /bindings | |
parent | 6861611dc8a8dcce70578d4494d9fbb7352ff019 (diff) | |
download | libsolv-65a287ed2a04cda74bc17b62ab54c180d0ac5dbf.tar.gz libsolv-65a287ed2a04cda74bc17b62ab54c180d0ac5dbf.tar.bz2 libsolv-65a287ed2a04cda74bc17b62ab54c180d0ac5dbf.zip |
add solver->describe_decision() method
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/solv.i | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index d2b917e..7de8fac 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -380,6 +380,13 @@ SWIG_AsValDepId(void *obj, int *val) { %include "typemaps.i" +%typemap(in,numinputs=0,noblock=1) XRule **OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ) { + $1 = &temp; +} +%typemap(argout,noblock=1) XRule **OUTPUT { + %append_output(SWIG_NewPointerObj((void*)(*$1), SWIGTYPE_p_XRule, SWIG_POINTER_OWN | %newpointer_flags)); +} + %typemaps_asval(%checkcode(POINTER), SWIG_AsValSolvFpPtr, "SWIG_AsValSolvFpPtr", FILE*); %typemaps_asval(%checkcode(INT32), SWIG_AsValDepId, "SWIG_AsValDepId", DepId); @@ -2631,6 +2638,18 @@ rb_eval_string( static const int SOLVER_FLAG_BEST_OBEY_POLICY = SOLVER_FLAG_BEST_OBEY_POLICY; static const int SOLVER_FLAG_NO_AUTOTARGET = SOLVER_FLAG_NO_AUTOTARGET; + static const int SOLVER_REASON_UNRELATED = SOLVER_REASON_UNRELATED; + static const int SOLVER_REASON_UNIT_RULE = SOLVER_REASON_UNIT_RULE; + static const int SOLVER_REASON_KEEP_INSTALLED = SOLVER_REASON_KEEP_INSTALLED; + static const int SOLVER_REASON_RESOLVE_JOB = SOLVER_REASON_RESOLVE_JOB; + static const int SOLVER_REASON_UPDATE_INSTALLED = SOLVER_REASON_UPDATE_INSTALLED; + static const int SOLVER_REASON_CLEANDEPS_ERASE = SOLVER_REASON_CLEANDEPS_ERASE; + static const int SOLVER_REASON_RESOLVE = SOLVER_REASON_RESOLVE; + static const int SOLVER_REASON_WEAKDEP = SOLVER_REASON_WEAKDEP; + static const int SOLVER_REASON_RESOLVE_ORPHAN = SOLVER_REASON_RESOLVE_ORPHAN; + static const int SOLVER_REASON_RECOMMENDED = SOLVER_REASON_RECOMMENDED; + static const int SOLVER_REASON_SUPPLEMENTED = SOLVER_REASON_SUPPLEMENTED; + ~Solver() { solver_free($self); } @@ -2687,6 +2706,13 @@ rb_eval_string( Transaction *transaction() { return solver_create_transaction($self); } + + int describe_decision(XSolvable *s, XRule **OUTPUT) { + int ruleid; + int reason = solver_describe_decision($self, s->id, &ruleid); + *OUTPUT = new_XRule($self, ruleid); + return reason; + } } %extend Transaction { |