diff --git a/glib/gfileutils.c b/glib/gfileutils.c index ea72f2161..110c26f43 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -2044,8 +2044,7 @@ g_build_pathv (const gchar *separator, * copies of the separator, elements consisting only of copies * of the separator are ignored. * - * Returns: (type filename) (transfer full): a newly-allocated string that - * must be freed with g_free(). + * Returns: (type filename) (transfer full): the newly allocated path **/ gchar * g_build_path (const gchar *separator, @@ -2201,11 +2200,16 @@ g_build_filename_va (const gchar *first_argument, * @first_element: (type filename): the first element in the path * @args: va_list of remaining elements in path * - * Behaves exactly like g_build_filename(), but takes the path elements - * as a va_list. This function is mainly meant for language bindings. + * Creates a filename from a list of elements using the correct + * separator for the current platform. * - * Returns: (type filename) (transfer full): a newly-allocated string that - * must be freed with g_free(). + * Behaves exactly like g_build_filename(), but takes the path elements + * as a va_list. + * + * This function is mainly meant for implementing other variadic arguments + * functions. + * + * Returns: (type filename) (transfer full): the newly allocated path * * Since: 2.56 */ @@ -2221,14 +2225,19 @@ g_build_filename_valist (const gchar *first_element, /** * g_build_filenamev: * @args: (array zero-terminated=1) (element-type filename): %NULL-terminated - * array of strings containing the path elements. + * array of strings containing the path elements. * - * Behaves exactly like g_build_filename(), but takes the path elements - * as a string array, instead of varargs. This function is mainly + * Creates a filename from a vector of elements using the correct + * separator for the current platform. + * + * This function behaves exactly like g_build_filename(), but takes the path + * elements as a string array, instead of varargs. This function is mainly * meant for language bindings. * - * Returns: (type filename) (transfer full): a newly-allocated string that - * must be freed with g_free(). + * If you are building a path programmatically you may want to use + * #GPathBuf instead. + * + * Returns: (type filename) (transfer full): the newly allocated path * * Since: 2.8 */ @@ -2244,7 +2253,7 @@ g_build_filenamev (gchar **args) * @...: remaining elements in path, terminated by %NULL * * Creates a filename from a series of elements using the correct - * separator for filenames. + * separator for the current platform. * * On Unix, this function behaves identically to `g_build_path * (G_DIR_SEPARATOR_S, first_element, ....)`. @@ -2259,9 +2268,11 @@ g_build_filenamev (gchar **args) * path. If the first element is a relative path, the result will * be a relative path. * - * Returns: (type filename) (transfer full): a newly-allocated string that - * must be freed with g_free(). - **/ + * If you are building a path programmatically you may want to use + * #GPathBuf instead. + * + * Returns: (type filename) (transfer full): the newly allocated path + */ gchar * g_build_filename (const gchar *first_element, ...)