mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
Clarify documentation about g_convert() nul-terminated returns
THere is effectively no nul-termination for multibyte characters.
This commit is contained in:
parent
f3fbf37dd8
commit
5a633f82db
@ -566,8 +566,16 @@ close_converter (GIConv cd)
|
|||||||
* </footnote>.
|
* </footnote>.
|
||||||
*
|
*
|
||||||
* Return value: If the conversion was successful, a newly allocated
|
* Return value: If the conversion was successful, a newly allocated
|
||||||
* nul-terminated string, which must be freed with
|
* nul-terminated<footnote id="nul-returns">
|
||||||
* g_free(). Otherwise %NULL and @error will be set.
|
* <para>
|
||||||
|
* Nul-terminated return values from conversion functions
|
||||||
|
* are terminated by a single 0 byte only. This means that
|
||||||
|
* for multibyte character sets like UTF-16, they must be
|
||||||
|
* treated as not nul-terminated.
|
||||||
|
* </para>
|
||||||
|
* </footnote>
|
||||||
|
* string, which must be freed with g_free(). Otherwise %NULL
|
||||||
|
* and @error will be set.
|
||||||
**/
|
**/
|
||||||
gchar*
|
gchar*
|
||||||
g_convert_with_iconv (const gchar *str,
|
g_convert_with_iconv (const gchar *str,
|
||||||
@ -719,8 +727,9 @@ g_convert_with_iconv (const gchar *str,
|
|||||||
* conversions<footnoteref linkend="streaming-state"/>.
|
* conversions<footnoteref linkend="streaming-state"/>.
|
||||||
*
|
*
|
||||||
* Return value: If the conversion was successful, a newly allocated
|
* Return value: If the conversion was successful, a newly allocated
|
||||||
* nul-terminated string, which must be freed with
|
* nul-terminated<footnoteref linkend="nul-returns"/> string,
|
||||||
* g_free(). Otherwise %NULL and @error will be set.
|
* which must be freed with g_free(). Otherwise %NULL and
|
||||||
|
* @error will be set.
|
||||||
**/
|
**/
|
||||||
gchar*
|
gchar*
|
||||||
g_convert (const gchar *str,
|
g_convert (const gchar *str,
|
||||||
@ -794,8 +803,9 @@ g_convert (const gchar *str,
|
|||||||
* conversions<footnoteref linkend="streaming-state"/>.
|
* conversions<footnoteref linkend="streaming-state"/>.
|
||||||
*
|
*
|
||||||
* Return value: If the conversion was successful, a newly allocated
|
* Return value: If the conversion was successful, a newly allocated
|
||||||
* nul-terminated string, which must be freed with
|
* nul-terminated<footnoteref linkend="nul-returns"/> string,
|
||||||
* g_free(). Otherwise %NULL and @error will be set.
|
* which must be freed with g_free(). Otherwise %NULL and
|
||||||
|
* @error will be set.
|
||||||
**/
|
**/
|
||||||
gchar*
|
gchar*
|
||||||
g_convert_with_fallback (const gchar *str,
|
g_convert_with_fallback (const gchar *str,
|
||||||
|
Loading…
Reference in New Issue
Block a user