Mailinglist Archive: zypp-commit (606 mails)

< Previous Next >
[zypp-commit] r9469 - /trunk/sat-solver/bindings/satsolver.i
  • From: kkaempf@xxxxxxxxxxxxxxxx
  • Date: Tue, 08 Apr 2008 14:31:43 -0000
  • Message-id: <20080408143143.A0CC026FFF@xxxxxxxxxxxxxxxx>
Author: kkaempf
Date: Tue Apr 8 16:31:43 2008
New Revision: 9469

URL: http://svn.opensuse.org/viewcvs/zypp?rev=9469&view=rev
Log:
- more comments
- implement retrieval of array attributes

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=9469&r1=9468&r2=9469&view=diff
==============================================================================
--- trunk/sat-solver/bindings/satsolver.i (original)
+++ trunk/sat-solver/bindings/satsolver.i Tue Apr 8 16:31:43 2008
@@ -182,7 +182,12 @@
*result = rb_str_new2( kv->str );
break;
case REPOKEY_TYPE_IDARRAY:
- *result = Qnil; /*FIXME*/
+ if (NIL_P(*result))
+ *result = rb_ary_new(); /* create new Array on first call */
+ if (data->localpool)
+ rb_ary_push( *result, rb_str_new2( stringpool_id2str( &data->spool,
kv->id ) ) );
+ else
+ rb_ary_push( *result, rb_str_new2( id2str( data->repo->pool, kv->id )
) );
break;
case REPOKEY_TYPE_REL_IDARRAY:
*result = Qnil; /*FIXME*/
@@ -612,6 +617,10 @@
XSolvable *find( char *name )
{ return xsolvable_find( $self->pool, name, $self ); }

+ /*-----
+ * Repodata / Attributes
+ */
+
/* return number of attached Repodata(s) */
int datasize()
{ return $self->nrepodata; }

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

< Previous Next >
This Thread
  • No further messages