Author: kkaempf Date: Tue Aug 5 13:49:53 2008 New Revision: 10757 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10757&view=rev Log: Huh ? Swig cannot %alias to __cmp__ for Python ?! Modified: trunk/sat-solver/bindings/dependency.i trunk/sat-solver/bindings/relation.i trunk/sat-solver/bindings/solvable.i Modified: trunk/sat-solver/bindings/dependency.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/dependency.i?rev=10757&r1=10756&r2=10757&view=diff ============================================================================== --- trunk/sat-solver/bindings/dependency.i (original) +++ trunk/sat-solver/bindings/dependency.i Tue Aug 5 13:49:53 2008 @@ -7,15 +7,15 @@ * iterating over dependency relations ('yield' in Ruby) */ +#if defined(SWIGRUBY) static int dependency_relations_iterate_callback( const Relation *rel ) { -#if defined(SWIGRUBY) /* FIXME: how to pass 'break' back to the caller ? */ rb_yield( SWIG_NewPointerObj((void*) rel, SWIGTYPE_p__Relation, 0) ); -#endif return 0; } +#endif %} Modified: trunk/sat-solver/bindings/relation.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/relation.i?rev=10757&r1=10756&r2=10757&view=diff ============================================================================== --- trunk/sat-solver/bindings/relation.i (original) +++ trunk/sat-solver/bindings/relation.i Tue Aug 5 13:49:53 2008 @@ -69,9 +69,10 @@ %alias compare "<=>"; #endif #if defined(SWIGPYTHON) - %alias compare "__cmp__"; -#endif + int __cmp__( const Relation *r ) +#else int compare( const Relation *r ) +#endif { return evrcmp( $self->pool, relation_evrid( $self ), relation_evrid( r ), EVRCMP_COMPARE ); } #if defined(SWIGRUBY) Modified: trunk/sat-solver/bindings/solvable.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/solvable.i?rev=10757&r1=10756&r2=10757&view=diff ============================================================================== --- trunk/sat-solver/bindings/solvable.i (original) +++ trunk/sat-solver/bindings/solvable.i Tue Aug 5 13:49:53 2008 @@ -230,9 +230,10 @@ %alias compare "<=>"; #endif #if defined(SWIGPYTHON) - %alias compare "__cmp__"; -#endif + int __cmp__( XSolvable *xs ) +#else int compare( XSolvable *xs ) +#endif { Solvable *s1 = xsolvable_solvable( $self ); Solvable *s2 = xsolvable_solvable( xs ); @@ -345,7 +346,7 @@ Solvable *s = xsolvable_solvable($self); if (repo_lookup( s, key, xsolvable_attr_lookup_callback, &result )) return result; -#if defined(SWIGPYTHON) /* needed for SWIG_Exception */ +#if defined(SWIGPYTHON) || defined(SWIGPERL)/* needed for SWIG_Exception */ fail: #endif return Swig_Null; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org