pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:3088:    RETURN generic_extract(s->str, s->size_shift, index);    }       /*! @decl Buffer `[..](int start, int start_type, int end, int end_type)    */    PIKEFUN Buffer `[..](int start, int start_type, int end, int end_type)    {    struct Buffer_struct *str = THIS;    struct pike_string *s = str->str.s;    unsigned len = s->len, shift = s->size_shift; -  void *p; +  char *p;       struct object *res;    struct Buffer_struct *str2;       pop_n_elems(args);    if (start_type == INDEX_FROM_END)    start = len-1-start;    if (end_type != INDEX_FROM_BEG)    end = len-1-end;    res = fast_clone_object( Buffer_program );
pike.git/src/builtin.cmod:3411:    *!    *! @seealso    *! @[get()], @[get_copy()], @[clear()]    */    PIKEFUN Buffer|void cut(int index, int|void end_or_none,void|int discard)    {    struct Buffer_struct *str = THIS, *str2;    struct object *res;    struct pike_string *s = str->str.s;    unsigned len = s->len,shift = s->size_shift; -  void *p = s->str; +  char *p = s->str;    INT_TYPE end,vdiscard;       end = args==1 ? len-1 : end_or_none->u.integer;    vdiscard = args==3 ? discard->u.integer : 0;    pop_n_elems(args);       if (index < 0)    index = 0;    if (end >= len)    end = len-1;