use g_string_sized_new() instread of g_string_new() to avoid often reallocation action

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2010-07-07 14:12:45 +03:00
parent 3aa6758f4f
commit 3facc59837

View File

@ -123,7 +123,7 @@ mc_search__glob_translate_to_regex (gchar * str, gsize * len)
static GString *
mc_search__translate_replace_glob_to_regex (gchar * str)
{
GString *buff = g_string_new ("");
GString *buff = g_string_sized_new (32);
int cnt = '0';
gboolean escaped_mode = FALSE;
while (*str)