glib-mkenums: fix handling of forward enum declarations
authorDan Winship <danw@gnome.org>
Tue, 7 Feb 2012 15:54:22 +0000 (10:54 -0500)
committerDan Winship <danw@gnome.org>
Tue, 7 Feb 2012 18:32:22 +0000 (13:32 -0500)
commitf049262a6105ecad71e5515300cbb0239800b10d
tree34d126dc0f8f94678b8bea5e47ee4eb9c3059d84
parent808346c6abd1af04221308a1ef3abe98b7f062f4
glib-mkenums: fix handling of forward enum declarations

Given

    typedef enum MyFoo MyFoo;

glib-mkenums would get confused, not notice the ";", and then keep
skipping lines until it found one that started with a "{", possibly
even going into the next file.

Fix it to just ignore those lines instead (and also, to error out if
it hits eof while parsing an enum).

https://bugzilla.gnome.org/show_bug.cgi?id=669595
gobject/glib-mkenums.in