Author: kkaempf Date: Thu Dec 4 13:44:06 2008 New Revision: 11867 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11867&view=rev Log: handle more than just standard ops 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=11867&r1=11866&r2=11867&view=diff ============================================================================== --- trunk/sat-solver/bindings/relation.i (original) +++ trunk/sat-solver/bindings/relation.i Thu Dec 4 13:44:06 2008 @@ -71,12 +71,22 @@ "", ">", "=", ">=", "<", "<>", "<=", "<=>" }; - int op = 0; + unsigned int op = 0; if (ISRELDEP( $self->id )) { Reldep *rd = GETRELDEP( $self->pool, $self->id ); op = rd->flags; } - return ops[op % 8]; + if (op < 8) + return ops[op]; + switch (op) { + case REL_AND: return "and"; + case REL_OR: return "or"; + case REL_WITH: return "with"; + case REL_NAMESPACE: return "namespace"; + case REL_ARCH: return "arch"; + default: break; + } + return "<op>"; } #if defined(SWIGRUBY) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org