pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:3108:    end = len-1-end;    res = fast_clone_object( Buffer_program );    str2 = OBJ2_BUFFER( res );    if (start < 0)    start = 0;    if (end >= len)    end = len-1;    str2->initial = end -= start-1;    init_string_builder_alloc (&str2->str, end, shift);    p = s->str; -  memcpy ((s = str2->str.s)->str, (char*)p+(start<<shift), end<<shift); +  memcpy ((s = str2->str.s)->str, p+(start<<shift), end<<shift);    s->str[end<<shift] = 0; // Ensure NUL-termination    s->len = end;    if( (Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT) )    res->flags |= OBJECT_CLEAR_ON_EXIT;    push_object (res);    }       /*! @decl int `[]=(int index, int ch)    */    PIKEFUN int `[]=(int index, int ch)