summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Kaplan <unknown>2005-09-11 06:33:44 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-09-12 14:32:29 +0000
commit6329a6bc37759bdf7db227ba0bff23484e9d8b01 (patch)
tree7669946f9964f84627c7483e60f15df768e070c8 /utils
parent7dd121aefd69a3ba2201a35698deaeda3a8a77ad (diff)
downloadperl-6329a6bc37759bdf7db227ba0bff23484e9d8b01.tar.gz
[perl #37142] h2xs skips enums with negative values
From: Aaron Kaplan (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-37142-120585.5.90517066191047@perl.org> p4raw-id: //depot/perl@25388
Diffstat (limited to 'utils')
-rw-r--r--utils/h2xs.PL5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL
index 20fa9c3a06..19452dede6 100644
--- a/utils/h2xs.PL
+++ b/utils/h2xs.PL
@@ -894,9 +894,8 @@ if( @path_h ){
# Remove C and C++ comments
$src =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs;
- while ($src =~ /(\benum\s*([\w_]*)\s*\{\s([\s\w=,]+)\})/gsc) {
- my ($enum_name, $enum_body) =
- $1 =~ /enum\s*([\w_]*)\s*\{\s([\s\w=,]+)\}/gs;
+ while ($src =~ /\benum\s*([\w_]*)\s*\{\s([^}]+)\}/gsc) {
+ my ($enum_name, $enum_body) = ($1, $2);
# skip enums matching $opt_e
next if $opt_e && $enum_name =~ /$opt_e/;
my $val = 0;