mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
glib: Slightly update GIOChannel documentation
Explain the default values of _{get,set}_close_on_unref() in the main description rather than the argument one, link to the GIOChannel structure when talking about it, and mention the default value of "close on unref" in g_io_channel_unix_new(). https://bugzilla.gnome.org/show_bug.cgi?id=787123
This commit is contained in:
parent
a72f57eeab
commit
f813ce6abe
@ -1012,12 +1012,14 @@ g_io_channel_get_flags (GIOChannel *channel)
|
||||
* g_io_channel_set_close_on_unref:
|
||||
* @channel: a #GIOChannel
|
||||
* @do_close: Whether to close the channel on the final unref of
|
||||
* the GIOChannel data structure. The default value of
|
||||
* this is %TRUE for channels created by g_io_channel_new_file (),
|
||||
* and %FALSE for all other channels.
|
||||
* the GIOChannel data structure.
|
||||
*
|
||||
* Whether to close the channel on the final unref of the #GIOChannel
|
||||
* data structure. The default value of this is %TRUE for channels
|
||||
* created by g_io_channel_new_file (), and %FALSE for all other channels.
|
||||
*
|
||||
* Setting this flag to %TRUE for a channel you have already closed
|
||||
* can cause problems.
|
||||
* can cause problems when the final reference to the #GIOChannel is dropped.
|
||||
**/
|
||||
void
|
||||
g_io_channel_set_close_on_unref (GIOChannel *channel,
|
||||
@ -1037,8 +1039,7 @@ g_io_channel_set_close_on_unref (GIOChannel *channel,
|
||||
* destroyed. The default value of this is %TRUE for channels created
|
||||
* by g_io_channel_new_file (), and %FALSE for all other channels.
|
||||
*
|
||||
* Returns: Whether the channel will be closed on the final unref of
|
||||
* the GIOChannel data structure.
|
||||
* Returns: %TRUE if the channel will be closed, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_io_channel_get_close_on_unref (GIOChannel *channel)
|
||||
|
@ -592,6 +592,8 @@ g_io_channel_new_file (const gchar *filename,
|
||||
* is reading output from a command using via pipe, you may need to set
|
||||
* the encoding to the encoding of the current locale (see
|
||||
* g_get_charset()) with the g_io_channel_set_encoding() function.
|
||||
* By default, the fd passed will not be closed when the final reference
|
||||
* to the #GIOChannel data structure is dropped.
|
||||
*
|
||||
* If you want to read raw binary data without interpretation, then
|
||||
* call the g_io_channel_set_encoding() function with %NULL for the
|
||||
|
Loading…
Reference in New Issue
Block a user