pike.git / src / post_modules / _ADT / sequence.cmod

version» Context lines:

pike.git/src/post_modules/_ADT/sequence.cmod:655:    /*! @decl SequenceIterator `+(int steps)    *! Move the iterator @[steps] steps forward (negative value on @[steps]    *! will cause the iterator to move backwards) and return the result    *! as a new iterator.    *! @returns    *! A new iterator positioned @[steps] steps forward.    */       PIKEFUN object `+(int steps)    { -  struct object *o=low_clone(Sequence_SequenceIterator_program); +  struct object *o=fast_clone_object(Sequence_SequenceIterator_program);    struct Sequence_SequenceIterator_struct *new;    new = OBJ2_SEQUENCE_SEQUENCEITERATOR(o);    new[0]=*THIS;    add_ref(THIS->obj);    new->pos+=steps;    if (new->pos < 0)    {    new->pos = 0;    }    else if (new->pos > new->sequence->a->size)
pike.git/src/post_modules/_ADT/sequence.cmod:707:    /*! @decl SequenceIterator `-(int steps)    *! Move the iterator @[steps] steps backwards (negative value on    *! @[steps] will cause the iterator to move forwards) and return    *! the result as a new iterator.    *! @returns    *! A new iterator positioned @[steps] steps backwards.    */       PIKEFUN object `-(int steps)    { -  struct object *o=low_clone(Sequence_SequenceIterator_program); +  struct object *o=fast_clone_object(Sequence_SequenceIterator_program);    struct Sequence_SequenceIterator_struct *new;    new = OBJ2_SEQUENCE_SEQUENCEITERATOR(o);    new[0]=*THIS;    add_ref(THIS->obj);    new->pos-=steps;    if (new->pos < 0)    {    new->pos = 0;    }    else if (new->pos > new->sequence->a->size)