pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:3439:
{ struct pike_string *s2; res = fast_clone_object( Buffer_program ); str2 = OBJ2_BUFFER( res ); init_string_builder_alloc(&str2->str, str2->initial = index, shift); memcpy((s2=str2->str.s)->str, p, len); s2->str[len] = 0; // Ensure NUL-termination s2->len = index; }
-
memmove(p,
(char*)
p+len, end<<shift); // Copy NUL-termination
+
memmove(p, p+len, end<<shift); // Copy NUL-termination
if( s->flags & STRING_CLEAR_ON_EXIT) guaranteed_memset(p+len+(end<<shift) , 0, len ); s->len -= index; if(!vdiscard) { if( (Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT) ) res->flags |= OBJECT_CLEAR_ON_EXIT; push_object(res); }