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 506986 - glib-mkenums cannot parse an enum whose value is a comma
glib-mkenums cannot parse an enum whose value is a comma
Status: RESOLVED DUPLICATE of bug 364709
Product: glib
Classification: Platform
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-01-03 08:04 UTC by Sebastian Dröge (slomo)
Modified: 2013-02-05 04:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2008-01-03 08:04:39 UTC
Quoting http://bugs.debian.org/457933 :

I have the following enum definition in a file called beef_instruction.h,
and I want it to be converted into a GEnum derived type.

    typedef enum {
        BEEF_INSTRUCTION_NONE        = '\0',
        BEEF_INSTRUCTION_PREVIOUS    = '<',
        BEEF_INSTRUCTION_NEXT        = '>',
        BEEF_INSTRUCTION_INCREASE    = '+',
        BEEF_INSTRUCTION_DECREASE    = '-',
        BEEF_INSTRUCTION_LOOP_BEGIN  = '[',
        BEEF_INSTRUCTION_LOOP_END    = ']',
        BEEF_INSTRUCTION_READ        = ',',
        BEEF_INSTRUCTION_PRINT       = '.',
        BEEF_INSTRUCTION_TAPE_DUMP   = '#'
    } BeefInstructionValue;

I think the code is legit and glib-mkenums should be able to handle it, but
the value of BEEF_INSTRUCTION_READ is skipped in the output files, and the
following error message is displayed:

    /usr/bin/glib-mkenums: beef_instruction.h:23: Failed to parse `
BEEF_INSTRUCTION_READ        = ',', '

Please consider fixing this, or let me know if the problem lies in my code.
Comment 1 Matthias Clasen 2008-07-14 17:34:05 UTC
Clearly a glib-mkenums problem.

As a workaround, consider using a hex or octal escape for now.
Comment 2 Matthias Clasen 2013-02-05 04:21:09 UTC

*** This bug has been marked as a duplicate of bug 364709 ***