Fix spelling of G_IO_FLAG_IS_WRITEABLE

Fixes #657045.
This commit is contained in:
David Schleef 2011-08-21 14:54:39 -07:00 committed by Ryan Lortie
parent 7a45dde4fe
commit 0d1a2eb4bf
3 changed files with 10 additions and 6 deletions

View File

@ -953,8 +953,9 @@ g_io_channel_get_line_term (GIOChannel *channel,
* the UNIX open() syscall).
* @G_IO_FLAG_IS_READABLE: indicates that the io channel is readable.
* This flag cannot be changed.
* @G_IO_FLAG_IS_WRITEABLE: indicates that the io channel is writable.
* @G_IO_FLAG_IS_WRITABLE: indicates that the io channel is writable.
* This flag cannot be changed.
* @G_IO_FLAG_IS_WRITEABLE: misspelled alternate to @G_IO_FLAG_IS_WRITABLE.
* @G_IO_FLAG_IS_SEEKABLE: indicates that the io channel is seekable,
* i.e. that g_io_channel_seek_position() can
* be used on it. This flag cannot be changed.
@ -989,7 +990,7 @@ g_io_channel_set_flags (GIOChannel *channel,
* Gets the current flags for a #GIOChannel, including read-only
* flags such as %G_IO_FLAG_IS_READABLE.
*
* The values of the flags %G_IO_FLAG_IS_READABLE and %G_IO_FLAG_IS_WRITEABLE
* The values of the flags %G_IO_FLAG_IS_READABLE and %G_IO_FLAG_IS_WRITABLE
* are cached for internal use by the channel when it is created.
* If they should change at some later point (e.g. partial shutdown
* of a socket with the UNIX shutdown() function), the user
@ -1014,7 +1015,7 @@ g_io_channel_get_flags (GIOChannel *channel)
if (channel->is_readable)
flags |= G_IO_FLAG_IS_READABLE;
if (channel->is_writeable)
flags |= G_IO_FLAG_IS_WRITEABLE;
flags |= G_IO_FLAG_IS_WRITABLE;
return flags;
}

View File

@ -98,13 +98,16 @@ typedef enum
G_IO_FLAG_APPEND = 1 << 0,
G_IO_FLAG_NONBLOCK = 1 << 1,
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Read only flag */
G_IO_FLAG_IS_WRITABLE = 1 << 3, /* Read only flag */
G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */
G_IO_FLAG_MASK = (1 << 5) - 1,
G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK,
G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK
} GIOFlags;
/* Misspelling in enum in 2.29.10 and earlier */
#define G_IO_FLAG_IS_WRITEABLE (G_IO_FLAG_IS_WRITABLE)
struct _GIOChannel
{
/*< private >*/

View File

@ -198,8 +198,8 @@ g_win32_print_gioflags (GIOFlags flags)
g_print ("%sNONBLOCK", bar), bar = "|";
if (flags & G_IO_FLAG_IS_READABLE)
g_print ("%sREADABLE", bar), bar = "|";
if (flags & G_IO_FLAG_IS_WRITEABLE)
g_print ("%sWRITEABLE", bar), bar = "|";
if (flags & G_IO_FLAG_IS_WRITABLE)
g_print ("%sWRITABLE", bar), bar = "|";
if (flags & G_IO_FLAG_IS_SEEKABLE)
g_print ("%sSEEKABLE", bar), bar = "|";
}