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 669595 - glib-mkenums: fix handling of forward enum declarations
glib-mkenums: fix handling of forward enum declarations
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 674119 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-02-07 18:32 UTC by Dan Winship
Modified: 2017-10-24 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-mkenums: fix handling of forward enum declarations (1.28 KB, patch)
2012-02-07 18:32 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2012-02-07 18:32:21 UTC
noticed in NM, where one file was forward-declaring an enum from
another file
Comment 1 Dan Winship 2012-02-07 18:32:23 UTC
Created attachment 207011 [details] [review]
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).
Comment 2 Colin Walters 2012-02-07 20:36:01 UTC
Review of attachment 207011 [details] [review]:

Do we have anyone else who still has Perl paged in?  Looks correct from what I remember though.
Comment 3 Emmanuele Bassi (:ebassi) 2012-02-07 21:21:19 UTC
Review of attachment 207011 [details] [review]:

looks good to me.
Comment 4 Dan Winship 2012-02-07 23:44:06 UTC
Attachment 207011 [details] pushed as f049262 - glib-mkenums: fix handling of forward enum declarations
Comment 5 Philip Withnall 2017-10-24 12:18:44 UTC
*** Bug 674119 has been marked as a duplicate of this bug. ***