GNOME Bugzilla – Bug 506986
glib-mkenums cannot parse an enum whose value is a comma
Last modified: 2013-02-05 04:21:09 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.
Clearly a glib-mkenums problem. As a workaround, consider using a hex or octal escape for now.
*** This bug has been marked as a duplicate of bug 364709 ***