[glib] Fix spelling of G_IO_FLAG_IS_WRITEABLE



commit 0d1a2eb4bfcd733e0c015c76fb0ca0308b8a61f0
Author: David Schleef <ds schleef org>
Date:   Sun Aug 21 14:54:39 2011 -0700

    Fix spelling of G_IO_FLAG_IS_WRITEABLE
    
    Fixes #657045.

 glib/giochannel.c |    7 ++++---
 glib/giochannel.h |    5 ++++-
 glib/giowin32.c   |    4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/glib/giochannel.c b/glib/giochannel.c
index d99ae49..70e375a 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -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;
 }
diff --git a/glib/giochannel.h b/glib/giochannel.h
index ec6a7c0..2a88799 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -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 >*/
diff --git a/glib/giowin32.c b/glib/giowin32.c
index c632c59..d39a4b2 100644
--- a/glib/giowin32.c
+++ b/glib/giowin32.c
@@ -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 = "|";
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]