mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02: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:
|
* GIOFlags:
|
||||||
|
* @G_IO_FLAG_NONE: no special flags set. Since: 2.74
|
||||||
* @G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND
|
* @G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND
|
||||||
* (see the documentation of the UNIX open() syscall)
|
* (see the documentation of the UNIX open() syscall)
|
||||||
* @G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
|
* @G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
|
||||||
|
@ -85,6 +85,7 @@ typedef enum
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
G_IO_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
||||||
G_IO_FLAG_APPEND = 1 << 0,
|
G_IO_FLAG_APPEND = 1 << 0,
|
||||||
G_IO_FLAG_NONBLOCK = 1 << 1,
|
G_IO_FLAG_NONBLOCK = 1 << 1,
|
||||||
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
|
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
|
||||||
|
@ -400,7 +400,7 @@ g_io_unix_set_flags (GIOChannel *channel,
|
|||||||
static GIOFlags
|
static GIOFlags
|
||||||
g_io_unix_get_flags (GIOChannel *channel)
|
g_io_unix_get_flags (GIOChannel *channel)
|
||||||
{
|
{
|
||||||
GIOFlags flags = 0;
|
GIOFlags flags = G_IO_FLAG_NONE;
|
||||||
glong fcntl_flags;
|
glong fcntl_flags;
|
||||||
GIOUnixChannel *unix_channel = (GIOUnixChannel *) channel;
|
GIOUnixChannel *unix_channel = (GIOUnixChannel *) channel;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user