gconvert: Clarify g_locale_to/from_utf8 docs
authorJehan <jehan@girinstud.io>
Sat, 19 Oct 2013 07:59:41 +0000 (20:59 +1300)
committerColin Walters <walters@verbum.org>
Sat, 19 Oct 2013 13:09:12 +0000 (09:09 -0400)
It was not clear from the doc whether the return value was to be freed
or belonging to glib.

https://bugzilla.gnome.org/show_bug.cgi?id=710496

glib/gconvert.c

index c28e171..3f14c48 100644 (file)
@@ -902,7 +902,8 @@ strdup_len (const gchar *string,
  * system) in the <link linkend="setlocale">current locale</link> into a
  * UTF-8 string.
  * 
- * Return value: The converted string, or %NULL on an error.
+ * Return value: A newly-allocated buffer containing the converted string,
+ *               or %NULL on an error, and error will be set.
  **/
 gchar *
 g_locale_to_utf8 (const gchar  *opsysstring,
@@ -943,7 +944,8 @@ g_locale_to_utf8 (const gchar  *opsysstring,
  * system) in the <link linkend="setlocale">current locale</link>. On
  * Windows this means the system codepage.
  * 
- * Return value: The converted string, or %NULL on an error.
+ * Return value: A newly-allocated buffer containing the converted string,
+ *               or %NULL on an error, and error will be set.
  **/
 gchar *
 g_locale_from_utf8 (const gchar *utf8string,