Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : Testing for equality doesn't change the Pool
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Tue, 23 Jun 2009 15:06:02 +0200
  • Message-id: <E1MJ5hQ-0007jj-07@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 4b53a4750b85d7e79e7df0f573396dbba9c94653
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Tue Jun 23 15:06:02 2009 +0200

Testing for equality doesn't change the Pool
---
bindings/pool.i | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/bindings/pool.i b/bindings/pool.i
index 7dc103c..d6bfd77 100644
--- a/bindings/pool.i
+++ b/bindings/pool.i
@@ -361,15 +361,17 @@ typedef struct _Pool {} Pool;
/*
* :nodoc:
*/
- int __eq__( Pool *pool )
+ int __eq__( const Pool *pool )
#endif
#if defined(SWIGRUBY)
+ %typemap(out) int equal
+ "$result = $1 ? Qtrue : Qfalse;";
%rename("==") equal;
/*
* Equality operator
*
*/
- int equal( Pool *pool )
+ int equal( const Pool *pool )
#endif

#if defined(SWIGPYTHON)
@@ -377,9 +379,9 @@ typedef struct _Pool {} Pool;
* :nodoc:
* Python treats 'eq' and 'ne' distinct.
*/
- int __ne__( Pool *pool )
+ int __ne__( const Pool *pool )
{ return $self != pool; }
- int __eq__( Pool *pool )
+ int __eq__( const Pool *pool )
#endif
{ return $self == pool; } /* common implementation */

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

< Previous Next >
This Thread
  • No further messages