Branch: Tag:

2016-12-16

2016-12-16 17:36:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Strings: Backported STRING_CHECKED_MASK from Pike 8.1.

Get rid of magic numeric constant ~15 in string handling.

1697:       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);
1870:    struct pike_string *b)   {    if( !b->len ) { -  ret->flags |= aflags & ~15; +  ret->flags |= aflags & STRING_CHECKED_MASK;    ret->min = amin;    ret->max = amax;    return;