glib r7572 - in trunk: . glib



Author: teuf
Date: Mon Oct  6 18:50:39 2008
New Revision: 7572
URL: http://svn.gnome.org/viewvc/glib?rev=7572&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/glib/gfileutils.c

Modified: trunk/glib/gfileutils.c
==============================================================================
--- trunk/glib/gfileutils.c	(original)
+++ trunk/glib/gfileutils.c	Mon Oct  6 18:50:39 2008
@@ -1824,13 +1824,16 @@
  * @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 @@
  * 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]