Author: kkaempf Date: Mon Jan 21 17:23:23 2008 New Revision: 8335 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8335&view=rev Log: add Ruby typemaps so flags appear as boolean in Ruby Modified: trunk/sat-solver/bindings/satsolver.i Modified: trunk/sat-solver/bindings/satsolver.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/satsolver.i?rev=8335&r1=8334&r2=8335&view=diff ============================================================================== --- trunk/sat-solver/bindings/satsolver.i (original) +++ trunk/sat-solver/bindings/satsolver.i Mon Jan 21 17:23:23 2008 @@ -16,7 +16,6 @@ %module satsolverx %feature("autodoc","1"); - %{ /*=============================================================*/ @@ -1517,6 +1516,10 @@ * Setting fix_system to 'true' will repair broken system * dependencies. */ +#if defined(SWIGRUBY) + %typemap(out) int fix_system + "$result = $1 ? Qtrue : Qfalse;"; +#endif int fix_system() { return $self->fixsystem; } #if defined(SWIGRUBY) @@ -1525,6 +1528,10 @@ void set_fix_system( int i ) { $self->fixsystem = i; } +#if defined(SWIGRUBY) + %typemap(out) int update_system + "$result = $1 ? Qtrue : Qfalse;"; +#endif int update_system() { return $self->updatesystem; } #if defined(SWIGRUBY) @@ -1533,6 +1540,10 @@ void set_update_system( int i ) { $self->updatesystem = i; } +#if defined(SWIGRUBY) + %typemap(out) int allow_downgrade + "$result = $1 ? Qtrue : Qfalse;"; +#endif int allow_downgrade() { return $self->allowdowngrade; } #if defined(SWIGRUBY) @@ -1551,6 +1562,10 @@ * Setting allow_uninstall to 'true' will revert the precedence * and remove all dependant packages. */ +#if defined(SWIGRUBY) + %typemap(out) int allow_uninstall + "$result = $1 ? Qtrue : Qfalse;"; +#endif int allow_uninstall() { return $self->allowuninstall; } #if defined(SWIGRUBY) @@ -1559,6 +1574,10 @@ void set_allow_uninstall( int i ) { $self->allowuninstall = i; } +#if defined(SWIGRUBY) + %typemap(out) int no_update_provide + "$result = $1 ? Qtrue : Qfalse;"; +#endif int no_update_provide() { return $self->noupdateprovide; } #if defined(SWIGRUBY) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org