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 661797 - glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/
glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 621942 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-14 18:36 UTC by Dan Winship
Modified: 2017-10-24 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/ (910 bytes, patch)
2011-10-14 18:36 UTC, Dan Winship
committed Details | Review
docs: don't refer to a deprecated glib-mkenums flag (1.38 KB, patch)
2011-10-28 22:04 UTC, Dan Winship
committed Details | Review
glib-mkenums: add --identifier-prefix and --symbol-prefix args (5.84 KB, patch)
2011-10-28 22:06 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-10-14 18:36:04 UTC
seen trying to port NetworkManager to use glib-mkenums...

I can haz glib-2-30?

(of course, really, glib-mkenums should probably take a
--symbol-prefix arg like g-i-scanner does, so you don't have to
use /*< underscore_name >*/ everywhere... right?)
Comment 1 Dan Winship 2011-10-14 18:36:06 UTC
Created attachment 199024 [details] [review]
glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/

For enums defined with an underscore_name override, @ENUMPREFIX@
would include a trailing "_". Fix.
Comment 2 Dan Winship 2011-10-19 15:30:43 UTC
(In reply to comment #0)
> (of course, really, glib-mkenums should probably take a
> --symbol-prefix arg like g-i-scanner does, so you don't have to
> use /*< underscore_name >*/ everywhere... right?)

or better yet, glib-mkenums should be reimplemented using the guts of g-ir-scanner so it parses everything consistently
Comment 3 Dan Winship 2011-10-28 22:04:32 UTC
Created attachment 200217 [details] [review]
docs: don't refer to a deprecated glib-mkenums flag

Refer to the new flag instead
Comment 4 Dan Winship 2011-10-28 22:06:15 UTC
Created attachment 200218 [details] [review]
glib-mkenums: add --identifier-prefix and --symbol-prefix args

Allow passing --identifier-prefix and --symbol-prefix to glib-mkenums,
with the same meanings as in g-ir-scanner, to allow fixing up the enum
name parsing globally rather than needing to add a /<* *>/ override to
each enum.

====

The patch could be smaller by merging the new code with the existing
code, but I did it this way on purpose to guarantee that it wasn't
going to end up changing glib-mkenum's behavior in some edge case.
Comment 5 Matthias Clasen 2011-10-29 01:43:25 UTC
Review of attachment 199024 [details] [review]:

Would be great to have some tests for glib-mkenums.
But this looks fine, anyway
Comment 6 Matthias Clasen 2011-10-29 02:11:09 UTC
Review of attachment 199024 [details] [review]:

Would be great to have some tests for glib-mkenums.
But this looks fine, anyway
Comment 7 Matthias Clasen 2011-10-29 02:11:19 UTC
Review of attachment 200217 [details] [review]:

Looks good
Comment 8 Matthias Clasen 2011-10-29 02:11:30 UTC
Review of attachment 200218 [details] [review]:

Looks fine
Comment 9 Dan Winship 2011-10-31 14:39:03 UTC
Attachment 199024 [details] pushed as dd4a8d3 - glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/
Attachment 200217 [details] pushed as 78a0dbd - docs: don't refer to a deprecated glib-mkenums flag
Attachment 200218 [details] pushed as f9c2362 - glib-mkenums: add --identifier-prefix and --symbol-prefix args
Comment 10 Philip Withnall 2017-10-24 10:07:31 UTC
*** Bug 621942 has been marked as a duplicate of this bug. ***