After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657045 - G_IO_FLAG_IS_WRITEABLE is misspelled
G_IO_FLAG_IS_WRITEABLE is misspelled
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-08-21 21:56 UTC by David Schleef
Modified: 2013-03-19 09:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix misspelling, compatibly. (3.04 KB, patch)
2011-08-21 21:56 UTC, David Schleef
reviewed Details | Review
replacement patch (3.28 KB, patch)
2011-08-26 01:22 UTC, David Schleef
committed Details | Review

Description David Schleef 2011-08-21 21:56:23 UTC
Created attachment 194336 [details] [review]
Patch to fix misspelling, compatibly.

G_IO_FLAG_IS_WRITEABLE is misspelled.
Comment 1 Emmanuele Bassi (:ebassi) 2011-08-22 06:22:21 UTC
Review of attachment 194336 [details] [review]:

I'm not so sure about changing this, now: it's been ten years.

::: glib/giochannel.h
@@ +99,3 @@
   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, misspelled */

I wonder if we could get away with just changing the name of the flag and then adding:

#define G_IO_FLAG_IS_WRITEABLE (G_IO_FLAG_IS_WRITABLE)

outside the enumeration.

this would allow deprecation of the old name at a later date.

::: glib/giowin32.c
@@ +199,3 @@
   if (flags & G_IO_FLAG_IS_READABLE)
     g_print ("%sREADABLE", bar), bar = "|";
+  if (flags & G_IO_FLAG_IS_WRITEBLE)

typo alert.
Comment 2 David Schleef 2011-08-26 01:22:29 UTC
Created attachment 194762 [details] [review]
replacement patch

Updated as requested.  I have no opinion whether it's worth it to actually fix the spelling.
Comment 3 Matthias Clasen 2011-08-27 19:57:15 UTC
Review of attachment 194762 [details] [review]:

Sure, why not.
Comment 4 Johan (not receiving bugmail) Dahlin 2011-09-09 07:07:52 UTC
This breaks the gir file, not sure if anything uses GIOFlags via introspection, but it's worth considering in the future.
Comment 5 Allison Karlitskaya (desrt) 2011-09-09 12:23:23 UTC
Johan: would it be better in the future if the deprecated item is added as an enum value in the following way?

enum {
  x_readable,
  x_writable,
#ifndef DISABLE_DEPRECATED
  x_writeable = x_writable,
#endif
  x_other_thing
};
Comment 6 Murray Cumming 2011-10-25 07:52:05 UTC
Yes, can we just change that to be an extra enum value, please? Otherwise, we have to manually hack this back into language bindings (which don't expect the extra #define) just to avoid breaking API.
Comment 7 Murray Cumming 2013-03-19 09:46:31 UTC
This was fixed to be a normal enum value:
https://git.gnome.org/browse/glib/commit/glib/giochannel.h?id=7788bb3a915cc0818186bb2c04a51e195579d13e

Thanks.