~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Lib/ruby/rubycontainer.swg

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-10 16:29:56 UTC
  • mfrom: (1.2.8 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081110162956-xue6itkuqhbza87s
Tags: 1.3.36-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop pike and libchicken-dev from the build-depends 
    (both are universe)
  - Use python2.5 instead of python2.4.
  - use php5
  - Clean Runtime/ as well.
  - debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.
  - drop "--without-mzscheme", we don't have it in our build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
691
691
      for ( ; i != e; )
692
692
        {
693
693
          VALUE r = swig::from< Sequence::value_type >(*i);
694
 
          if ( RTEST( rb_yield(r) ) )
 
694
          if ( RTEST( rb_yield(r) ) ) {
695
695
            $self->erase(i++);
696
 
          else
 
696
            e = self->end();
 
697
          } else {
697
698
            ++i;
 
699
          }
698
700
        }
699
701
        
700
702
      return self;
1004
1006
  template <class RubySeq, class Seq>
1005
1007
  inline void
1006
1008
  assign(const RubySeq& rubyseq, Seq* seq) {
1007
 
%#ifdef SWIG_STD_NOASSIGN_STL
 
1009
    // seq->assign(rubyseq.begin(), rubyseq.end()); // not used as not always implemented
1008
1010
    typedef typename RubySeq::value_type value_type;
1009
1011
    typename RubySeq::const_iterator it = rubyseq.begin();
1010
1012
    for (;it != rubyseq.end(); ++it) {
1011
1013
      seq->insert(seq->end(),(value_type)(*it));
1012
1014
    }
1013
 
%#else
1014
 
    seq->assign(rubyseq.begin(), rubyseq.end());
1015
 
%#endif
1016
1015
  }
1017
1016
 
1018
1017
  template <class Seq, class T = typename Seq::value_type >