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

version» Context lines:

pike.git/src/post_modules/_ADT/circular_list.cmod:959:    /*! @decl CircularListIterator `+(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(CircularList_CircularListIterator_program); +  struct object *o=fast_clone_object(CircularList_CircularListIterator_program);    struct CircularList_CircularListIterator_struct *new;    new = OBJ2_CIRCULARLIST_CIRCULARLISTITERATOR(o);    new[0]=*THIS;    add_ref(THIS->obj);    new->pos+=steps;    if (new->pos < 0)    {    new->pos = 0;    }    else if (new->pos > new->list->size)
pike.git/src/post_modules/_ADT/circular_list.cmod:1012:    /*! @decl CircularListIterator `-(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(CircularList_CircularListIterator_program); +  struct object *o=fast_clone_object(CircularList_CircularListIterator_program);    struct CircularList_CircularListIterator_struct *new;    new = OBJ2_CIRCULARLIST_CIRCULARLISTITERATOR(o);    new[0]=*THIS;    add_ref(THIS->obj);    new->pos-=steps;    if (new->pos < 0)    {    new->pos = 0;    }    else if (new->pos > new->list->size)