pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:3137:   PMOD_EXPORT void free_string_builder(struct string_builder *s)   {    s->s->len = s->malloced;    free_string(s->s);   }      PMOD_EXPORT struct pike_string *finish_string_builder(struct string_builder *s)   {    ptrdiff_t len = s->s->len;    if (len != s->malloced) { -  s->s->len = s->malloced; +  s->s->len = s->malloced; /* Restore the allocated length. */    s->s = realloc_unlinked_string(s->s, len);    }    if(s->known_shift == s->s->size_shift)    return low_end_shared_string(s->s);    return end_shared_string(s->s);   }      PMOD_EXPORT PCHARP MEMCHR_PCHARP(PCHARP ptr, int chr, ptrdiff_t len)   {    switch(ptr.shift)