Branch: Tag:

2014-12-04

2014-12-04 19:23:37 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;