This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handle U suffixed unsigned int literals from regexp.h
authorTony Cook <tony@develop-help.com>
Mon, 16 Jan 2012 22:02:50 +0000 (09:02 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 16 Jan 2012 22:50:27 +0000 (09:50 +1100)
regen/regcomp.pl

index 6ed84f3..69643ca 100644 (file)
@@ -262,6 +262,10 @@ foreach my $file ("op_reg_common.h", "regexp.h") {
             foreach my $key (keys %definitions) {
                 s/\b$key\b/$definitions{$key}/g;
             }
+
+           # Remove the U suffix from unsigned int literals
+           s/\b([0-9]+)U\b/$1/g;
+
             my $newval = eval $_;   # Get numeric definition
 
             $definitions{$define} = $newval;