Branch: Tag:

2015-08-22

2015-08-22 18:35:09 by Arne Goedeke <el@laramies.com>

Strings: generate more static strings

quick_add_function and make_shared_string will now create
static strings when the argument is a compile time constant

813:    s = make_static_string(str, len, shift);    link_pike_string(s, h);    } else { +  +  if (!string_is_static(s)) { +  if (string_is_block_allocated(s)) { +  ba_free(&string_allocator, s->str); +  } else { +  free(s->str); +  } +  s->flags &= ~STRING_ALLOC_MASK; +  s->flags |= STRING_ALLOC_STATIC; +  s->str = str; +  } +     add_ref(s);    }