pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:1992:    /* Actually create a substring. */       /* If the string to take a substring of is    a substring, take from the original. */    if( s->alloc_type == STRING_ALLOC_SUBSTRING )    {    struct pike_string *pr= substring_content_string(s);    /* Note: If substrings are ever anywhere except at the end,    this might need to change.    */ -  start += s->str-pr->str; +  start += (s->str-pr->str)>>s->size_shift;    s = pr;    }       if( (len+start == s->len)    && start < (s->len>>1)    && (!s->size_shift    || (s->size_shift==1 &&    find_magnitude1(((p_wchar1*)s->str)+start,len)==1)    || (s->size_shift==2 &&    find_magnitude2(((p_wchar2*)s->str)+start,len)==2)))