mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 05:43:07 +02:00
gfileutils: factor out g_build_filename_va()
This will be used in a later commit. https://bugzilla.gnome.org/show_bug.cgi?id=788488
This commit is contained in:
parent
8e8f4e6486
commit
68d62c33fd
@ -1965,6 +1965,22 @@ g_build_pathname_va (const gchar *first_element,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static gchar *
|
||||||
|
g_build_filename_va (const gchar *first_argument,
|
||||||
|
va_list *args,
|
||||||
|
gchar **str_array)
|
||||||
|
{
|
||||||
|
gchar *str;
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
|
str = g_build_path_va (G_DIR_SEPARATOR_S, first_argument, args, str_array);
|
||||||
|
#else
|
||||||
|
str = g_build_pathname_va (first_argument, args, str_array);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_build_filenamev:
|
* g_build_filenamev:
|
||||||
* @args: (array zero-terminated=1) (element-type filename): %NULL-terminated
|
* @args: (array zero-terminated=1) (element-type filename): %NULL-terminated
|
||||||
@ -1982,15 +1998,7 @@ g_build_pathname_va (const gchar *first_element,
|
|||||||
gchar *
|
gchar *
|
||||||
g_build_filenamev (gchar **args)
|
g_build_filenamev (gchar **args)
|
||||||
{
|
{
|
||||||
gchar *str;
|
return g_build_filename_va (NULL, NULL, args);
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
|
||||||
str = g_build_path_va (G_DIR_SEPARATOR_S, NULL, NULL, args);
|
|
||||||
#else
|
|
||||||
str = g_build_pathname_va (NULL, NULL, args);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2025,11 +2033,7 @@ g_build_filename (const gchar *first_element,
|
|||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start (args, first_element);
|
va_start (args, first_element);
|
||||||
#ifndef G_OS_WIN32
|
str = g_build_filename_va (first_element, &args, NULL);
|
||||||
str = g_build_path_va (G_DIR_SEPARATOR_S, first_element, &args, NULL);
|
|
||||||
#else
|
|
||||||
str = g_build_pathname_va (first_element, &args, NULL);
|
|
||||||
#endif
|
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user