pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:1690:    }   }      struct pike_string *new_realloc_shared_string(struct pike_string *a, INT32 size, int shift)   {    struct pike_string *r;    if(shift == a->size_shift) return realloc_shared_string(a,size);       r=begin_wide_shared_string(size,shift);    pike_string_cpy(MKPCHARP_STR(r),a); -  r->flags |= (a->flags & ~15); +  r->flags |= (a->flags & STRING_CHECKED_MASK);    r->min = a->min;    r->max = a->max;    free_string(a);    return r;   }         /* Modify one index in a shared string    * Not suitable for building new strings or changing multiple characters    * within a string!
pike.git/src/stralloc.c:1863:    }   }      PMOD_EXPORT void set_flags_for_add( struct pike_string *ret,    unsigned char aflags,    unsigned char amin,    unsigned char amax,    struct pike_string *b)   {    if( !b->len ) { -  ret->flags |= aflags & ~15; +  ret->flags |= aflags & STRING_CHECKED_MASK;    ret->min = amin;    ret->max = amax;    return;    }    if( aflags & b->flags & STRING_CONTENT_CHECKED )    {    ret->min = MINIMUM( amin, b->min );    ret->max = MAXIMUM( amax, b->max );    ret->flags |= STRING_CONTENT_CHECKED;    }