mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(str_ptr_array_join): return GString.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
6af68462dd
commit
a309e1e133
@ -41,7 +41,7 @@
|
||||
/*** file scope functions ************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static char *
|
||||
static GString *
|
||||
str_ptr_array_join (const GPtrArray * str_splints)
|
||||
{
|
||||
GString *return_str;
|
||||
@ -51,7 +51,7 @@ str_ptr_array_join (const GPtrArray * str_splints)
|
||||
for (i = 0; i < str_splints->len; i++)
|
||||
g_string_append (return_str, g_ptr_array_index (str_splints, i));
|
||||
|
||||
return g_string_free (return_str, FALSE);
|
||||
return return_str;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
@ -73,7 +73,7 @@ str_replace_all (const char *haystack, const char *needle, const char *replaceme
|
||||
{
|
||||
size_t needle_len;
|
||||
GPtrArray *str_splints;
|
||||
char *return_str;
|
||||
GString *return_str;
|
||||
|
||||
needle_len = strlen (needle);
|
||||
|
||||
@ -112,7 +112,7 @@ str_replace_all (const char *haystack, const char *needle, const char *replaceme
|
||||
g_ptr_array_foreach (str_splints, (GFunc) g_free, NULL);
|
||||
g_ptr_array_free (str_splints, TRUE);
|
||||
|
||||
return return_str;
|
||||
return g_string_free (return_str, FALSE);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user