Branch: Tag:

2016-01-18

2016-01-18 18:03:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Strings: Minor optimization in end_and_resize_shared_string().

There's no need to copy the string data if the string in progress
already has the correct size.

939: Inside #if defined(PIKE_DEBUG)
   if(len > str->len)    Pike_fatal("Cannot extend string here!\n");   #endif +  if (len == str->len) { +  return end_shared_string(str); +  }    tmp = make_shared_binary_pcharp(MKPCHARP_STR(str),len);    free_string(str);    return tmp;