mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
src/strutil.c: replace call of g_string_append_vprintf() with g_strdup_vprintf and g_string_append
Not all versions of glib2 have function g_string_append_vprintf
This commit is contained in:
parent
ca7427cd35
commit
ad2eb8877b
@ -252,9 +252,17 @@ str_vfs_convert_to (GIConv coder, const char *string, int size,
|
|||||||
void
|
void
|
||||||
str_printf (GString * buffer, const char *format, ...)
|
str_printf (GString * buffer, const char *format, ...)
|
||||||
{
|
{
|
||||||
|
gchar *tmp;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
g_string_append_vprintf (buffer, format, ap);
|
/*
|
||||||
|
* more simple call:
|
||||||
|
g_string_append_vprintf (buffer, format, ap);
|
||||||
|
* but not all versions of glib2 have this function :(
|
||||||
|
*/
|
||||||
|
tmp = g_strdup_vprintf ( format, ap);
|
||||||
|
g_string_append (buffer, tmp);
|
||||||
|
g_free(tmp);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user