Fix spelling of G_IO_FLAG_IS_WRITEABLE
authorDavid Schleef <ds@schleef.org>
Sun, 21 Aug 2011 21:54:39 +0000 (14:54 -0700)
committerRyan Lortie <desrt@desrt.ca>
Fri, 9 Sep 2011 00:22:42 +0000 (20:22 -0400)
Fixes #657045.

glib/giochannel.c
glib/giochannel.h
glib/giowin32.c

index d99ae49..70e375a 100644 (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;
 }
index ec6a7c0..2a88799 100644 (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 >*/
index c632c59..d39a4b2 100644 (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 = "|";
 }