[zypp-commit] r11857 - /trunk/sat-solver/bindings/relation.i
Author: kkaempf Date: Thu Dec 4 10:52:41 2008 New Revision: 11857 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11857&view=rev Log: access relation operator as string Modified: trunk/sat-solver/bindings/relation.i Modified: trunk/sat-solver/bindings/relation.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/relation.i?rev=11857&r1=11856&r2=11857&view=diff ============================================================================== --- trunk/sat-solver/bindings/relation.i (original) +++ trunk/sat-solver/bindings/relation.i Thu Dec 4 10:52:41 2008 @@ -65,6 +65,20 @@ return 0; } + const char *op_s() + { + static const char *ops[] = { + "", ">", "=", ">=", + "<", "<>", "<=", "<=>" + }; + int op = 0; + if (ISRELDEP( $self->id )) { + Reldep *rd = GETRELDEP( $self->pool, $self->id ); + op = rd->flags; + } + return ops[op % 8]; + } + #if defined(SWIGRUBY) %alias compare "<=>"; #endif -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
kkaempf@svn.opensuse.org