Author: aschnell Date: Tue Jul 31 11:11:59 2007 New Revision: 6322 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6322&view=rev Log: - use each define Modified: trunk/libzypp-bindings/swig/ruby/ruby.i trunk/libzypp-bindings/swig/zypp.i Modified: trunk/libzypp-bindings/swig/ruby/ruby.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/ruby.i?rev=6322&r1=6321&r2=6322&view=diff ============================================================================== --- trunk/libzypp-bindings/swig/ruby/ruby.i (original) +++ trunk/libzypp-bindings/swig/ruby/ruby.i Tue Jul 31 11:11:59 2007 @@ -30,7 +30,7 @@ %mixin cls "Enumerable"; \ %extend cls { \ void each() { \ - cls::iterator i = self->begin(); \ + cls::const_iterator i = self->begin(); \ while ( i != self->end() ) { \ const storetype tmp = &**i; \ rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \ @@ -46,7 +46,7 @@ %mixin cls "Enumerable"; \ %extend cls { \ void each() { \ - cls::iterator i = self->begin(); \ + cls::const_iterator i = self->begin(); \ while ( i != self->end() ) { \ const storetype tmp = &*i; \ rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \ @@ -93,16 +93,16 @@ } } -%extend ResPool { - void each() - { - ResPool::const_iterator i = self->begin(); - while ( i != self->end() ) { - rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0)); - ++i; - } - } -} +// %extend ResPool { +// void each() +// { +// ResPool::const_iterator i = self->begin(); +// while ( i != self->end() ) { +// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0)); +// ++i; +// } +// } +// } %extend ResPool { void each_by_kind( const ResObject::Kind & kind_r ) Modified: trunk/libzypp-bindings/swig/zypp.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/zypp.i?rev=6322&r1=6321&r2=6322&view=diff ============================================================================== --- trunk/libzypp-bindings/swig/zypp.i (original) +++ trunk/libzypp-bindings/swig/zypp.i Tue Jul 31 11:11:59 2007 @@ -118,6 +118,7 @@ /* define iterators using swig macros */ iter2( ResStore, ResObject* ) iter3( CapSet, Capability* ) +iter3(ResPool, PoolItem_Ref*) auto_iterator( std::list<RepoInfo>, RepoInfo ) #endif -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org