mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
giochannel: Add G_IO_FLAG_NONE
This makes the state where no flags are set a bit more self-documenting. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
cc528f6c2e
commit
cef780e9ef
@ -946,6 +946,7 @@ g_io_channel_get_line_term (GIOChannel *channel,
|
||||
**/
|
||||
/**
|
||||
* GIOFlags:
|
||||
* @G_IO_FLAG_NONE: no special flags set. Since: 2.74
|
||||
* @G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND
|
||||
* (see the documentation of the UNIX open() syscall)
|
||||
* @G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
|
||||
|
@ -85,6 +85,7 @@ typedef enum
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_IO_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
||||
G_IO_FLAG_APPEND = 1 << 0,
|
||||
G_IO_FLAG_NONBLOCK = 1 << 1,
|
||||
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
|
||||
|
@ -400,7 +400,7 @@ g_io_unix_set_flags (GIOChannel *channel,
|
||||
static GIOFlags
|
||||
g_io_unix_get_flags (GIOChannel *channel)
|
||||
{
|
||||
GIOFlags flags = 0;
|
||||
GIOFlags flags = G_IO_FLAG_NONE;
|
||||
glong fcntl_flags;
|
||||
GIOUnixChannel *unix_channel = (GIOUnixChannel *) channel;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user