mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
Annotate g_filename_to_utf8()
bytes_read and bytes_written are (out) arguments, and the return value must be a byte array instead of utf8, as otherwise the function would only support UTF-8 locales/file names.
This commit is contained in:
parent
11f26aafc2
commit
1061b0ddbc
@ -1496,15 +1496,15 @@ g_filename_to_utf8 (const gchar *opsysstring,
|
|||||||
* @utf8string: a UTF-8 encoded string.
|
* @utf8string: a UTF-8 encoded string.
|
||||||
* @len: the length of the string, or -1 if the string is
|
* @len: the length of the string, or -1 if the string is
|
||||||
* nul-terminated.
|
* nul-terminated.
|
||||||
* @bytes_read: location to store the number of bytes in the
|
* @bytes_read: (out) (allow-none): location to store the number of bytes in
|
||||||
* input string that were successfully converted, or %NULL.
|
* the input string that were successfully converted, or %NULL.
|
||||||
* Even if the conversion was successful, this may be
|
* Even if the conversion was successful, this may be
|
||||||
* less than @len if there were partial characters
|
* less than @len if there were partial characters
|
||||||
* at the end of the input. If the error
|
* at the end of the input. If the error
|
||||||
* #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
|
* #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
|
||||||
* stored will the byte offset after the last valid
|
* stored will the byte offset after the last valid
|
||||||
* input sequence.
|
* input sequence.
|
||||||
* @bytes_written: the number of bytes stored in the output buffer (not
|
* @bytes_written: (out): the number of bytes stored in the output buffer (not
|
||||||
* including the terminating nul).
|
* including the terminating nul).
|
||||||
* @error: location to store the error occurring, or %NULL to ignore
|
* @error: location to store the error occurring, or %NULL to ignore
|
||||||
* errors. Any of the errors in #GConvertError may occur.
|
* errors. Any of the errors in #GConvertError may occur.
|
||||||
@ -1514,7 +1514,8 @@ g_filename_to_utf8 (const gchar *opsysstring,
|
|||||||
* on other platforms, this function indirectly depends on the
|
* on other platforms, this function indirectly depends on the
|
||||||
* <link linkend="setlocale">current locale</link>.
|
* <link linkend="setlocale">current locale</link>.
|
||||||
*
|
*
|
||||||
* Return value: The converted string, or %NULL on an error.
|
* Return value: (array length=bytes_written) (element-type guint8) (transfer full):
|
||||||
|
* The converted string, or %NULL on an error.
|
||||||
**/
|
**/
|
||||||
gchar*
|
gchar*
|
||||||
g_filename_from_utf8 (const gchar *utf8string,
|
g_filename_from_utf8 (const gchar *utf8string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user