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



commit dd4a8d333ddab043c5a6e89c0d19e56a1bdcec3e
Author: Dan Winship <danw gnome org>
Date:   Fri Oct 14 14:32:11 2011 -0400

    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

 gobject/glib-mkenums.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 6372245..af0304d 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]