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 629741 - glib-mkenums can't parse enumerations with multi-line definition of members
glib-mkenums can't parse enumerations with multi-line definition of members
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-09-15 09:48 UTC by Anton Gorenko
Modified: 2018-05-24 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Anton Gorenko 2010-09-15 09:48:37 UTC
glib-mkenums tool generates wrong definition of CoglBufferAccess in
cogl_buffer_access_get_type (cogl-enum-types.c)

Here are 2 entries of COGL_BUFFER_ACCESS_WRITE:

...
      static const GFlagsValue values[] = {
        { COGL_BUFFER_ACCESS_READ, "COGL_BUFFER_ACCESS_READ", "read" },
        { COGL_BUFFER_ACCESS_WRITE, "COGL_BUFFER_ACCESS_WRITE", "write" },
        { COGL_BUFFER_ACCESS_READ_WRITE, "COGL_BUFFER_ACCESS_READ_WRITE",
"read-write" },
        { COGL_BUFFER_ACCESS_WRITE, "COGL_BUFFER_ACCESS_WRITE", "write" },
        { 0, NULL, NULL }
      };
...
So Cogl-1.0.gir also contains 2 entries of COGL_BUFFER_ACCESS_WRITE.

glib-mkenums can't parse enumerations with multi-line definition of members:

http://git.clutter-project.org/clutter/tree/clutter/cogl/cogl/cogl-buffer.h#n154
typedef enum { /*< prefix=COGL_BUFFER_ACCESS >*/
 COGL_BUFFER_ACCESS_READ       = 1 << 0,
 COGL_BUFFER_ACCESS_WRITE      = 1 << 1,
 COGL_BUFFER_ACCESS_READ_WRITE = COGL_BUFFER_ACCESS_READ |
                                 COGL_BUFFER_ACCESS_WRITE
} CoglBufferAccess;

(Linked Clutter bug: http://bugzilla.clutter-project.org/show_bug.cgi?id=2238)
Comment 1 GNOME Infrastructure Team 2018-05-24 12:45:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/345.