Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7652 - /trunk/sat-solver/bindings/satsolver.i
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Fri, 26 Oct 2007 13:57:15 -0000
  • Message-id: <20071026135715.A508F1736A@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Fri Oct 26 15:57:15 2007
New Revision: 7652

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7652&view=rev
Log:
add source from .solv file in a OO way

Modified:
trunk/sat-solver/bindings/satsolver.i

Modified: trunk/sat-solver/bindings/satsolver.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/satsolver.i?rev=7652&r1=7651&r2=7652&view=diff
==============================================================================
--- trunk/sat-solver/bindings/satsolver.i (original)
+++ trunk/sat-solver/bindings/satsolver.i Fri Oct 26 15:57:15 2007
@@ -63,16 +63,35 @@
{
return pool_addsource_empty($self);
}
+
+ Source * add_source_solv(FILE *fp, const char *sourcename)
+ { pool_addsource_solv($self, fp, sourcename); }
};
%newobject pool_create;
%delobject pool_free;


%include "poolid.h"
-%include "poolid_private.h"
%include "pooltypes.h"
%include "queue.h"
%include "solvable.h"
+
+%extend Solvable {
+
+ //%typemap(ruby,in) Id {
+ // $1 = id2str($self->pool, $input);
+ //}
+
+ //%typemap(ruby,out) Id {
+ // $result = rb_str_new2(str2id($self->pool,$1));
+ //}
+
+ //%rename(name_id) name();
+ const char * name()
+ { return id2str($self->source->pool, $self->name);}
+
+}
+
%include "solver.h"
%include "source.h"

@@ -87,7 +106,8 @@
for (; i < endof; i++)
{
s = $self->pool->solvables + i;
- rb_yield(SWIG_NewPointerObj((void*) s, $descriptor(storetype), 0));
+ //rb_yield(SWIG_NewPointerObj((void*) s, $descriptor(Solvable), 0));
+ rb_yield(SWIG_NewPointerObj((void*) s, SWIGTYPE_p__Solvable, 0));
}
}
};

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages