Merge branch 'backport-2251-string-performance-glib-2-70' into 'glib-2-70'

Backport !2251 “GString: Bump minimum size” to glib-2-70

See merge request GNOME/glib!2253
This commit is contained in:
Sebastian Dröge 2021-10-19 06:21:55 +00:00
commit 494062b36f

View File

@ -123,7 +123,7 @@ g_string_sized_new (gsize dfl_size)
string->len = 0; string->len = 0;
string->str = NULL; string->str = NULL;
g_string_maybe_expand (string, MAX (dfl_size, 2)); g_string_maybe_expand (string, MAX (dfl_size, 64));
string->str[0] = 0; string->str[0] = 0;
return string; return string;