summaryrefslogtreecommitdiff
path: root/bindings/solv.i
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/solv.i')
-rw-r--r--bindings/solv.i35
1 files changed, 33 insertions, 2 deletions
diff --git a/bindings/solv.i b/bindings/solv.i
index adaf1a3..ad265a5 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -381,6 +381,7 @@ typedef struct {
%typemap(in) Queue Array2Queue(SWIG_AsVal_int, "integers")
%typemap(in) Queue solvejobs ObjArray2Queue(Job *, queue_push2(&$1, obj->how, obj->what))
+%typemap(in) Queue solvables ObjArray2Queue(XSolvable *, queue_push(&$1, obj->id))
@@ -1007,6 +1008,7 @@ typedef int Id;
%constant int REL_ERROR;
%constant int REL_WITHOUT;
%constant int REL_UNLESS;
+%constant int REL_CONDA;
typedef struct {
Pool* const pool;
@@ -1378,7 +1380,7 @@ typedef struct {
if ($self->pool == lsel->pool)
selection_subtract($self->pool, &$self->q, &lsel->q);
}
-
+
void select(const char *name, int flags) {
if ((flags & SELECTION_MODEBITS) == 0)
flags |= SELECTION_FILTER | SELECTION_WITH_ALL;
@@ -1394,6 +1396,11 @@ typedef struct {
flags |= SELECTION_FILTER | SELECTION_WITH_ALL;
$self->flags = selection_make_matchdepid($self->pool, &$self->q, dep, flags, keyname, marker);
}
+ void matchsolvable(XSolvable *solvable, int flags, Id keyname, Id marker = -1) {
+ if ((flags & SELECTION_MODEBITS) == 0)
+ flags |= SELECTION_FILTER | SELECTION_WITH_ALL;
+ $self->flags = selection_make_matchsolvable($self->pool, &$self->q, solvable->id, flags, keyname, marker);
+ }
%typemap(out) Queue jobs Queue2Array(Job *, 2, new_Job(arg1->pool, id, idp[1]));
%newobject jobs;
@@ -1707,7 +1714,7 @@ typedef struct {
int result, ecode = 0, vresult = 0;
Tcl_Obj *objvx[2];
objvx[0] = callback_var->obj;
- objvx[1] = SWIG_NewInstanceObj(SWIG_as_voidptr(xd), SWIGTYPE_p_XRepodata, 0);
+ objvx[1] = SWIG_NewInstanceObj(SWIG_as_voidptr(xd), SWIGTYPE_p_XRepodata, 0);
Tcl_IncrRefCount(objvx[1]);
result = Tcl_EvalObjv(interp, sizeof(objvx)/sizeof(*objvx), objvx, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(objvx[1]);
@@ -1945,6 +1952,14 @@ typedef struct {
queue_push(&q, p);
return q;
}
+ %typemap(out) Queue best_solvables Queue2Array(XSolvable *, 1, new_XSolvable(arg1, id));
+ %newobject best_solvables;
+ Queue best_solvables(Queue solvables, int flags=0) {
+ Queue q;
+ queue_init_clone(&q, &solvables);
+ pool_best_solvables($self, &q, flags);
+ return q;
+ }
Id towhatprovides(Queue q) {
return pool_queuetowhatprovides($self, &q);
@@ -1969,6 +1984,15 @@ typedef struct {
return q;
}
+ %typemap(out) Queue whatmatchessolvable Queue2Array(XSolvable *, 1, new_XSolvable(arg1, id));
+ %newobject whatmatchessolvable;
+ Queue whatmatchessolvable(Id keyname, XSolvable *pool_solvable, Id marker = -1) {
+ Queue q;
+ queue_init(&q);
+ pool_whatmatchessolvable($self, keyname, pool_solvable->id, &q, marker);
+ return q;
+ }
+
#ifdef SWIGRUBY
%rename("isknownarch?") isknownarch;
#endif
@@ -2019,6 +2043,13 @@ typedef struct {
return sel;
}
+ %newobject matchsolvable;
+ Selection *matchsolvable(XSolvable *solvable, int flags, Id keyname, Id marker = -1) {
+ Selection *sel = new_Selection($self);
+ sel->flags = selection_make_matchsolvable($self, &sel->q, solvable->id, flags, keyname, marker);
+ return sel;
+ }
+
Queue get_considered_list() {
Queue q;
queue_init(&q);