Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11751 - /trunk/sat-solver/bindings/solvable.i
  • From: kkaempf@xxxxxxxxxxxxxxxx
  • Date: Thu, 20 Nov 2008 15:58:45 -0000
  • Message-id: <20081120155845.404A0DF746@xxxxxxxxxxxxxxxx>
Author: kkaempf
Date: Thu Nov 20 16:58:44 2008
New Revision: 11751

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11751&view=rev
Log:
make solvable_identical() available

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

Modified: trunk/sat-solver/bindings/solvable.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/solvable.i?rev=11751&r1=11750&r2=11751&view=diff
==============================================================================
--- trunk/sat-solver/bindings/solvable.i (original)
+++ trunk/sat-solver/bindings/solvable.i Thu Nov 20 16:58:44 2008
@@ -97,6 +97,28 @@
return i;
}

+#if defined(SWIGRUBY)
+ /*
+ * Ruby
+ * solvable.identical?(other_solvable) => bool
+ */
+ %rename("identical?") identical;
+ %typemap(out) int identical
+ "$result = ($1 != 0) ? Qtrue : Qfalse;";
+#endif
+ /*
+ * solvable_identical represents satsolver semantics for 'equality'
+ * This might be different from your application needs, beware !
+ */
+ int identical( XSolvable *xs )
+ {
+ Solvable *s1 = xsolvable_solvable( $self );
+ Solvable *s2 = xsolvable_solvable( xs );
+ if ($self->pool == xs->pool)
+ return solvable_identical($self->pool, s1, s2);
+ return 0;
+ }
+
/*
* Dependencies
*/

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

< Previous Next >
This Thread
  • No further messages