From 6a19b99a9d4ef154988ed56e1f2f74a6d6ed8253 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 6 Oct 2008 18:50:39 +0000 Subject: [PATCH] =?utf8?q?Bug=20555224=20=E2=80=93=20Improve=20g=5Fformat?= =?utf8?q?=5Fsize=5Ffor=5Fdisplay=20doc=20*=20glib/gfileutils.c:=20change?= =?utf8?q?=20g=5Fformat=5Fsize=5Ffor=5Fdisplay=20API=20doc=20to=20explicit?= =?utf8?q?ly=20say=20that=20the=20returned=20string=20has=20to=20be=20free?= =?utf8?q?d.=20Change=20spelling=20of=20"newly=20allocated"=20to=20"newly-?= =?utf8?q?allocated"=20in=20g=5Ffile=5Fread=5Flink=20API=20doc=20to=20be?= =?utf8?q?=20more=20consistent=20with=20what=20is=20done=20in=20that=20fil?= =?utf8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=7572 --- ChangeLog | 9 +++++++++ glib/gfileutils.c | 15 +++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fd02c07..d21b0c76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-06 Christophe Fergeau + + Bug 555224 – Improve g_format_size_for_display doc + + * glib/gfileutils.c: change g_format_size_for_display API doc to + explicitly say that the returned string has to be freed. Change + spelling of "newly allocated" to "newly-allocated" in g_file_read_link + API doc to be more consistent with what is done in that file. + 2008-10-01 David Zeuthen * README.in: Add "Notes about glib 2.20" section detailing the diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 34ecc649..fb6536db 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -1824,13 +1824,16 @@ g_build_filename (const gchar *first_element, * @size: a size in bytes. * * Formats a size (for example the size of a file) into a human readable string. - * Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed rounded to - * the nearest tenth. E.g. the file size 3292528 bytes will be converted into - * the string "3.1 MB". + * Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed + * rounded to the nearest tenth. E.g. the file size 3292528 bytes will be + * converted into the string "3.1 MB". * * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes). - * - * Returns: a formatted string containing a human readable file size. + * + * This string should be freed with g_free() when not needed any longer. + * + * Returns: a newly-allocated formatted string containing a human readable + * file size. * * Since: 2.16 **/ @@ -1871,7 +1874,7 @@ g_format_size_for_display (goffset size) * readlink() function. The returned string is in the encoding used * for filenames. Use g_filename_to_utf8() to convert it to UTF-8. * - * Returns: A newly allocated string with the contents of the symbolic link, + * Returns: A newly-allocated string with the contents of the symbolic link, * or %NULL if an error occurred. * * Since: 2.4 -- 2.34.1