mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	glib: add g_build_filename_valist()
A new public API convenience to build a filename from a va_list. https://bugzilla.gnome.org/show_bug.cgi?id=788488
This commit is contained in:
		
				
					committed by
					
						 Cosimo Cecchi
						Cosimo Cecchi
					
				
			
			
				
	
			
			
			
						parent
						
							68d62c33fd
						
					
				
				
					commit
					374ade1b68
				
			| @@ -1851,6 +1851,7 @@ g_path_get_basename | ||||
| g_path_get_dirname | ||||
| g_build_filename | ||||
| g_build_filenamev | ||||
| g_build_filename_valist | ||||
| g_build_path | ||||
| g_build_pathv | ||||
|  | ||||
|   | ||||
| @@ -1981,6 +1981,28 @@ g_build_filename_va (const gchar  *first_argument, | ||||
|   return str; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * g_build_filename_valist: | ||||
|  * @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. | ||||
|  * | ||||
|  * Returns: (type filename): a newly-allocated string that must be freed | ||||
|  *     with g_free(). | ||||
|  * | ||||
|  * Since: 2.56 | ||||
|  */ | ||||
| gchar * | ||||
| g_build_filename_valist (const gchar  *first_element, | ||||
|                          va_list      *args) | ||||
| { | ||||
|   g_return_val_if_fail (first_element != NULL, NULL); | ||||
|  | ||||
|   return g_build_filename_va (first_element, args, NULL); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * g_build_filenamev: | ||||
|  * @args: (array zero-terminated=1) (element-type filename): %NULL-terminated | ||||
|   | ||||
| @@ -131,6 +131,9 @@ gchar   *g_build_filename     (const gchar *first_element, | ||||
|                                ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; | ||||
| GLIB_AVAILABLE_IN_ALL | ||||
| gchar   *g_build_filenamev    (gchar      **args) G_GNUC_MALLOC; | ||||
| GLIB_AVAILABLE_IN_2_56 | ||||
| gchar   *g_build_filename_valist (const gchar  *first_element, | ||||
|                                   va_list      *args) G_GNUC_MALLOC; | ||||
|  | ||||
| GLIB_AVAILABLE_IN_ALL | ||||
| gint     g_mkdir_with_parents (const gchar *pathname, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user