Branch: Tag:

2013-06-10

2013-06-10 18:41:52 by Tobias S. Josefowitz <tobij@tobij.de>

use string range information in has_prefix and has_suffix

1197:    a = Pike_sp[-args].u.string;       /* First handle some common special cases. */ -  if ((b->len > a->len) || (b->size_shift > a->size_shift)) { +  if ((b->len > a->len) || (b->size_shift > a->size_shift) +  || !string_range_contains_string(a, b)) {    pop_n_elems(args);    push_int(0);    return;
1269:    b = Pike_sp[1-args].u.string;       /* First handle some common special cases. */ -  if ((b->len > a->len) || (b->size_shift > a->size_shift)) { +  if ((b->len > a->len) || (b->size_shift > a->size_shift) +  || !string_range_contains_string(a, b)) {    pop_n_elems(args);    push_int(0);    return;