mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56: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:
|
* g_io_channel_set_close_on_unref:
|
||||||
* @channel: a #GIOChannel
|
* @channel: a #GIOChannel
|
||||||
* @do_close: Whether to close the channel on the final unref of
|
* @do_close: Whether to close the channel on the final unref of
|
||||||
* the GIOChannel data structure. The default value of
|
* the GIOChannel data structure.
|
||||||
* this is %TRUE for channels created by g_io_channel_new_file (),
|
*
|
||||||
* and %FALSE for all other channels.
|
* 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
|
* 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
|
void
|
||||||
g_io_channel_set_close_on_unref (GIOChannel *channel,
|
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
|
* destroyed. The default value of this is %TRUE for channels created
|
||||||
* by g_io_channel_new_file (), and %FALSE for all other channels.
|
* by g_io_channel_new_file (), and %FALSE for all other channels.
|
||||||
*
|
*
|
||||||
* Returns: Whether the channel will be closed on the final unref of
|
* Returns: %TRUE if the channel will be closed, %FALSE otherwise.
|
||||||
* the GIOChannel data structure.
|
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_io_channel_get_close_on_unref (GIOChannel *channel)
|
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
|
* is reading output from a command using via pipe, you may need to set
|
||||||
* the encoding to the encoding of the current locale (see
|
* the encoding to the encoding of the current locale (see
|
||||||
* g_get_charset()) with the g_io_channel_set_encoding() function.
|
* 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
|
* If you want to read raw binary data without interpretation, then
|
||||||
* call the g_io_channel_set_encoding() function with %NULL for the
|
* call the g_io_channel_set_encoding() function with %NULL for the
|
||||||
|
Loading…
Reference in New Issue
Block a user