glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/

For enums defined with an underscore_name override, @ENUMPREFIX@
would include a trailing "_". Fix.

https://bugzilla.gnome.org/show_bug.cgi?id=661797
This commit is contained in:
Dan Winship 2011-10-14 14:32:11 -04:00
parent 9782598b81
commit dd4a8d333d

View File

@ -379,7 +379,7 @@ while (<>) {
$enumshort =~ s/^[A-Z][A-Z0-9]*_//;
$enumname_prefix = $enumlong;
$enumname_prefix =~ s/$enumshort$//;
$enumname_prefix =~ s/_$enumshort$//;
} else {
# enumname is e.g. GMatchType
$enspace = $enumname;