pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2013-06-09
2013-06-09 22:19:13 by Arne Goedeke <el@laramies.com>
4dd43e8600e73462ea4e7f5ed86d3adfe7c354bd (
7
lines) (+
4
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
use string range information to optimize replace
2216:
ONERROR mojt_uwp; replace_searchfunc f = (replace_searchfunc)0;
-
if(!str->len)
+
if(!str->len
|| !string_range_contains_string(str, del
)
)
{
-
add_ref(
empty_pike_string
);
-
return
empty_pike_string
;
+
add_ref(
str
);
+
return
str
;
} shift=MAXIMUM(str->size_shift,to->size_shift);